<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244075</link>
    <title>MATLAB Central Newsreader - Memory limit workaround</title>
    <description>Feed for thread: Memory limit workaround</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sun, 08 Feb 2009 18:40:04 -0500</pubDate>
      <title>Memory limit workaround</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244075#626965</link>
      <author>Thiago </author>
      <description>I have a 3GHz pentium 4 with 1GB of RAM and 1524MB of virtual memory. Even with this modest system, I am able to compose a 1x61276 character array in MATLAB. This array has 3 variables in combination with a variety of complex numbers cast into string-form. If I run eval( arg ), where arg is this huge array, I am supposed to obtain a 2x1 symbolic matrix. However, I get the following error message:&lt;br&gt;
&lt;br&gt;
??? Error using ==&amp;gt; horzcat&lt;br&gt;
Out of memory. Type HELP MEMORY for your options.&lt;br&gt;
&lt;br&gt;
Error in ==&amp;gt; sym.sym&amp;gt;findrun at 536&lt;br&gt;
d = diff([0 x 0]);&lt;br&gt;
&lt;br&gt;
Error in ==&amp;gt; sym.sym&amp;gt;char2sym at 437&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;[b,e] = findrun(sp); % Beginning (b) and end (e) indices.&lt;br&gt;
&lt;br&gt;
Error in ==&amp;gt; sym.sym at 92&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;S = char2sym(x);&lt;br&gt;
&lt;br&gt;
Error in ==&amp;gt; sym.maple at 92&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;result = sym(result);&lt;br&gt;
&lt;br&gt;
Error in ==&amp;gt; sym.mtimes at 28&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;X = maple(A,'&amp;*',B);&lt;br&gt;
&lt;br&gt;
I've already increased virtual memory and ran disk defragmenter. I've also cleared all workspace variables, except for the (sym) and (char) variables that are part of my expression, before calling eval(). At this point, I see no alternative other than buying more physical memory or trying to get hold of a super-computer! Maybe there is a workaround that I haven't tried yet. If so, please let me know. Thanks.&lt;br&gt;
&lt;br&gt;
PS: I posted the 1x61276 character array here: &lt;a href=&quot;http://people.rit.edu/tsj9205/&quot;&gt;http://people.rit.edu/tsj9205/&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Sun, 08 Feb 2009 20:13:02 -0500</pubDate>
      <title>Re: Memory limit workaround</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244075#626976</link>
      <author>Image Analyst</author>
      <description>One option is to use Star-P (&lt;a href=&quot;http://www.interactivesupercomputing.com/products/).&quot;&gt;http://www.interactivesupercomputing.com/products/).&lt;/a&gt;  If you use Star-P, you can have tens of terabytes  in memory (or at least the appearance of such due to some tricks they play with memory management).  Pretty much eliminates any memory issue you'd ever have.</description>
    </item>
    <item>
      <pubDate>Sun, 08 Feb 2009 20:33:01 -0500</pubDate>
      <title>Re: Memory limit workaround</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244075#626980</link>
      <author>Thiago </author>
      <description>That's brilliant! Thank you for your suggestion. I'm going to get a license through my school.</description>
    </item>
    <item>
      <pubDate>Tue, 10 Feb 2009 21:50:41 -0500</pubDate>
      <title>Re: Memory limit workaround</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244075#627483</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Thiago &quot; &amp;lt;thiago@mathworks.com&amp;gt; wrote in message &lt;br&gt;
news:gmn8u4$dks$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;I have a 3GHz pentium 4 with 1GB of RAM and 1524MB of virtual memory. Even &lt;br&gt;
&amp;gt;with this modest system, I am able to compose a 1x61276 character array in &lt;br&gt;
&amp;gt;MATLAB. This array has 3 variables in combination with a variety of complex &lt;br&gt;
&amp;gt;numbers cast into string-form. If I run eval( arg ), where arg is this huge &lt;br&gt;
&amp;gt;array, I am supposed to obtain a 2x1 symbolic matrix. However, I get the &lt;br&gt;
&amp;gt;following error message:&lt;br&gt;
&lt;br&gt;
*snip*&lt;br&gt;
&lt;br&gt;
&amp;gt; PS: I posted the 1x61276 character array here: &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://people.rit.edu/tsj9205/&quot;&gt;http://people.rit.edu/tsj9205/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Rather than performing the explicit multiplication to extract the first &lt;br&gt;
column of the matrix, why not just create the matrix using the first 61269 &lt;br&gt;
characters (removing the &quot;* [1;0]&quot;) and index into it to extract the first &lt;br&gt;
column.  That's all that multiplication is doing, and that's where you're &lt;br&gt;
running out of memory.&lt;br&gt;
&lt;br&gt;
Alternately, if you don't need one or all of the variables to be symbolic &lt;br&gt;
(i.e. you know values for those variables ahead of time) assign values to &lt;br&gt;
those variables and then evaluate your string.  Performing the calculations &lt;br&gt;
numerically will be MUCH quicker and will avoid using so much memory.  [If &lt;br&gt;
you're trying to create the matrix symbolically so you can later substitute &lt;br&gt;
values in repeatedly, instead assign values to those variables repeatedly &lt;br&gt;
and evaluate the expression numerically.]&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com </description>
    </item>
  </channel>
</rss>

