<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Huge expression one term by line into archive.txt</title>
    <link>http://www.mapleprimes.com/questions/143095-Huge-Expression-One-Term-By-Line-Into-Archivetxt</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 11:14:28 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 11:14:28 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Huge expression one term by line into archive.txt</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Huge expression one term by line into archive.txt</title>
      <link>http://www.mapleprimes.com/questions/143095-Huge-Expression-One-Term-By-Line-Into-Archivetxt</link>
    </image>
    <item>
      <title>op</title>
      <link>http://www.mapleprimes.com/questions/143095-Huge-Expression-One-Term-By-Line-Into-Archivetxt?ref=Feed:MaplePrimes:Huge expression one term by line into archive.txt:Comments#answer143099</link>
      <itunes:summary>&lt;p&gt;If your expression is called w (you cannot assign to Easr3Vc*s2) and it is a sum of terms, then to inspect these terms it seems easiest to do a loop like this:&lt;/p&gt;
&lt;p&gt;for i to nops(w) do op(i,w) end do;&lt;/p&gt;
&lt;p&gt;To write these lines to a file you could do&lt;/p&gt;
&lt;p&gt;M:=Matrix();&lt;br&gt;for i to nops(w) do M(i,1):=op(i,w) end do:&lt;br&gt;M[3,1];&lt;br&gt;#or simpler:&lt;br&gt;M:=Matrix(nops(w),1,(i,j)-&amp;gt;op(i,w));&lt;/p&gt;
&lt;p&gt;ExportMatrix("G:/MapleDiverse/MaplePrimes/archive.txt",M);&lt;/p&gt;
&lt;p&gt;To retrieve w (in Maple):&lt;/p&gt;
&lt;p&gt;restart;&lt;br&gt;A:=ImportMatrix("G:/MapleDiverse/MaplePrimes/archive.txt");&lt;br&gt;add(A[i,1],i=1..numelems(A));&lt;br&gt;&lt;br&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;If your expression is called w (you cannot assign to Easr3Vc*s2) and it is a sum of terms, then to inspect these terms it seems easiest to do a loop like this:&lt;/p&gt;
&lt;p&gt;for i to nops(w) do op(i,w) end do;&lt;/p&gt;
&lt;p&gt;To write these lines to a file you could do&lt;/p&gt;
&lt;p&gt;M:=Matrix();&lt;br&gt;for i to nops(w) do M(i,1):=op(i,w) end do:&lt;br&gt;M[3,1];&lt;br&gt;#or simpler:&lt;br&gt;M:=Matrix(nops(w),1,(i,j)-&amp;gt;op(i,w));&lt;/p&gt;
&lt;p&gt;ExportMatrix("G:/MapleDiverse/MaplePrimes/archive.txt",M);&lt;/p&gt;
&lt;p&gt;To retrieve w (in Maple):&lt;/p&gt;
&lt;p&gt;restart;&lt;br&gt;A:=ImportMatrix("G:/MapleDiverse/MaplePrimes/archive.txt");&lt;br&gt;add(A[i,1],i=1..numelems(A));&lt;br&gt;&lt;br&gt;&lt;/p&gt;</description>
      <guid>143099</guid>
      <pubDate>Tue, 05 Feb 2013 20:55:31 Z</pubDate>
      <itunes:author>Preben Alsholm</itunes:author>
      <author>Preben Alsholm</author>
    </item>
    <item>
      <title>my terms separated by lines, like my example</title>
      <link>http://www.mapleprimes.com/questions/143095-Huge-Expression-One-Term-By-Line-Into-Archivetxt?ref=Feed:MaplePrimes:Huge expression one term by line into archive.txt:Comments#answer143109</link>
      <itunes:summary>&lt;p&gt;my terms separated by lines, like my example above.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;my terms separated by lines, like my example above.&lt;/p&gt;</description>
      <guid>143109</guid>
      <pubDate>Tue, 05 Feb 2013 23:09:17 Z</pubDate>
      <itunes:author>trottaleonardo</itunes:author>
      <author>trottaleonardo</author>
    </item>
    <item>
      <title>Extra blank lines with fprintf</title>
      <link>http://www.mapleprimes.com/questions/143095-Huge-Expression-One-Term-By-Line-Into-Archivetxt?ref=Feed:MaplePrimes:Huge expression one term by line into archive.txt:Comments#answer143118</link>
      <itunes:summary>&lt;p&gt;I let &lt;strong&gt;expr&lt;/strong&gt; represent your large expression. Then do&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;fd:= FileTools:-Text:-Open("C:/Users/Carl/desktop/archive.txt"):&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;seq(fprintf(fd, "%a\n\n", term), term in expr):&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;fclose(fd);&lt;/strong&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;I let &lt;strong&gt;expr&lt;/strong&gt; represent your large expression. Then do&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;fd:= FileTools:-Text:-Open("C:/Users/Carl/desktop/archive.txt"):&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;seq(fprintf(fd, "%a\n\n", term), term in expr):&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;fclose(fd);&lt;/strong&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;</description>
      <guid>143118</guid>
      <pubDate>Wed, 06 Feb 2013 02:07:11 Z</pubDate>
      <itunes:author>Carl Love</itunes:author>
      <author>Carl Love</author>
    </item>
    <item>
      <title>Done! =]</title>
      <link>http://www.mapleprimes.com/questions/143095-Huge-Expression-One-Term-By-Line-Into-Archivetxt?ref=Feed:MaplePrimes:Huge expression one term by line into archive.txt:Comments#answer143119</link>
      <itunes:summary>&lt;p&gt;Thnx a lot for your attention I just realize an easy way to fix this problem. I did:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;E:=convert(Z,list):&lt;br&gt;F:=convert(E,Vector):&lt;br&gt;ExportVector("/home/demac/archive2.txt",F):&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;And done; Thank you a lot. =]&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;Thnx a lot for your attention I just realize an easy way to fix this problem. I did:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;E:=convert(Z,list):&lt;br&gt;F:=convert(E,Vector):&lt;br&gt;ExportVector("/home/demac/archive2.txt",F):&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;And done; Thank you a lot. =]&lt;/pre&gt;</description>
      <guid>143119</guid>
      <pubDate>Wed, 06 Feb 2013 02:35:27 Z</pubDate>
      <itunes:author>trottaleonardo</itunes:author>
      <author>trottaleonardo</author>
    </item>
    <item>
      <title>fprintf /seq</title>
      <link>http://www.mapleprimes.com/questions/143095-Huge-Expression-One-Term-By-Line-Into-Archivetxt?ref=Feed:MaplePrimes:Huge expression one term by line into archive.txt:Comments#answer143133</link>
      <itunes:summary>&lt;p&gt;f := randpoly([x,y,z]); &amp;nbsp;# expression&lt;/p&gt;
&lt;p&gt;fn := "filename.txt": seq(fprintf(fn,"%a\n",i), i=f): fclose(fn):&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;f := randpoly([x,y,z]); &amp;nbsp;# expression&lt;/p&gt;
&lt;p&gt;fn := "filename.txt": seq(fprintf(fn,"%a\n",i), i=f): fclose(fn):&lt;/p&gt;</description>
      <guid>143133</guid>
      <pubDate>Wed, 06 Feb 2013 06:46:18 Z</pubDate>
      <itunes:author>roman_pearce</itunes:author>
      <author>roman_pearce</author>
    </item>
    <item>
      <title>Didn't go very well...</title>
      <link>http://www.mapleprimes.com/questions/143095-Huge-Expression-One-Term-By-Line-Into-Archivetxt?ref=Feed:MaplePrimes:Huge expression one term by line into archive.txt:Comments#comment143108</link>
      <itunes:summary>&lt;p&gt;Op, Thnx for the help but that hint didn't worked very well here, i got the terms in archive.txt separated in two lines.&lt;/p&gt;
&lt;p&gt;I tried this:&lt;/p&gt;
&lt;pre&gt;E:=convert(Z,list):&lt;br&gt;F:=convert(E,Matrix):&lt;br&gt;ExportMatrix("/home/demac/archive2.txt",F):&lt;/pre&gt;
&lt;pre&gt;And I got terms separated by spaces, just wanna realize what i have to do to have my terms separated by lines, like my example above.&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;PS: I am on ubuntu 11.10 and Maple 13.&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;Op, Thnx for the help but that hint didn't worked very well here, i got the terms in archive.txt separated in two lines.&lt;/p&gt;
&lt;p&gt;I tried this:&lt;/p&gt;
&lt;pre&gt;E:=convert(Z,list):&lt;br&gt;F:=convert(E,Matrix):&lt;br&gt;ExportMatrix("/home/demac/archive2.txt",F):&lt;/pre&gt;
&lt;pre&gt;And I got terms separated by spaces, just wanna realize what i have to do to have my terms separated by lines, like my example above.&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;PS: I am on ubuntu 11.10 and Maple 13.&lt;/pre&gt;</description>
      <guid>143108</guid>
      <pubDate>Tue, 05 Feb 2013 23:08:21 Z</pubDate>
      <itunes:author>trottaleonardo</itunes:author>
      <author>trottaleonardo</author>
    </item>
  </channel>
</rss>