<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168840</link>
    <title>MATLAB Central Newsreader - overcoming the limit of repmat</title>
    <description>Feed for thread: overcoming the limit of repmat</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The 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>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 07 May 2008 03:43:03 -0400</pubDate>
      <title>overcoming the limit of repmat</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168840#430713</link>
      <author>Sourav Roy</author>
      <description>Hi,&lt;br&gt;
I tried the below code :- &lt;br&gt;
&amp;gt;&amp;gt; z = rand(1,(666),10000);&lt;br&gt;
&amp;gt;&amp;gt; x = repmat(z,300,1);&lt;br&gt;
&lt;br&gt;
The code gave the below error:- &lt;br&gt;
&lt;br&gt;
??? Maximum variable size allowed by the program is &lt;br&gt;
exceeded.&lt;br&gt;
&lt;br&gt;
Error in ==&amp;gt; repmat at 97&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;B = A(subs{:});&lt;br&gt;
&lt;br&gt;
While this one worked, &lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; ab = z(:,:,1);&lt;br&gt;
&amp;gt;&amp;gt; z = rand(1,(666),100);&lt;br&gt;
&amp;gt;&amp;gt; x = repmat(z,300,1);&lt;br&gt;
&lt;br&gt;
Kindly suggest how I can overcome this.&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 07 May 2008 04:03:02 -0400</pubDate>
      <title>Re: overcoming the limit of repmat</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168840#430718</link>
      <author>helper </author>
      <description>"Sourav Roy" &amp;lt;souravroy1@rediffmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;fvr8g7$sep$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; I tried the below code :- &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; z = rand(1,(666),10000);&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; x = repmat(z,300,1);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The code gave the below error:- &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ??? Maximum variable size allowed by the program is &lt;br&gt;
&amp;gt; exceeded.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Error in ==&amp;gt; repmat at 97&lt;br&gt;
&amp;gt;     B = A(subs{:});&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; While this one worked, &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; ab = z(:,:,1);&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; z = rand(1,(666),100);&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; x = repmat(z,300,1);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Kindly suggest how I can overcome this.&lt;br&gt;
&lt;br&gt;
You are trying to create a 300-by-666-by-10000 matrix of &lt;br&gt;
double precision (8 byte) values.  This requires &lt;br&gt;
300*666*10000*8/1024^3 = 14.88 GB of memory.  It ain't &lt;br&gt;
gonna happen with 32-bit MATLAB.  Check out the following &lt;br&gt;
technical note:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.mathworks.com/support/tech-notes/1100/1106.html"&gt;http://www.mathworks.com/support/tech-notes/1100/1106.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Get 64-bit MATLAB and a 64-bit machine.&lt;br&gt;
&lt;br&gt;
By the way... love the tags "matlab" and "code".&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 07 May 2008 04:43:03 -0400</pubDate>
      <title>Re: overcoming the limit of repmat</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168840#430729</link>
      <author>Sourav Roy</author>
      <description>"helper " &amp;lt;spamless@nospam.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;fvr9lm$nkk$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; "Sourav Roy" &amp;lt;souravroy1@rediffmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;fvr8g7$sep$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi,&lt;br&gt;
&amp;gt; &amp;gt; I tried the below code :- &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt; z = rand(1,(666),10000);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt; x = repmat(z,300,1);&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; The code gave the below error:- &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; ??? Maximum variable size allowed by the program is &lt;br&gt;
&amp;gt; &amp;gt; exceeded.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Error in ==&amp;gt; repmat at 97&lt;br&gt;
&amp;gt; &amp;gt;     B = A(subs{:});&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; While this one worked, &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt; ab = z(:,:,1);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt; z = rand(1,(666),100);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt; x = repmat(z,300,1);&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Kindly suggest how I can overcome this.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; You are trying to create a 300-by-666-by-10000 matrix of &lt;br&gt;
&amp;gt; double precision (8 byte) values.  This requires &lt;br&gt;
&amp;gt; 300*666*10000*8/1024^3 = 14.88 GB of memory.  It ain't &lt;br&gt;
&amp;gt; gonna happen with 32-bit MATLAB.  Check out the following &lt;br&gt;
&amp;gt; technical note:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href="http://www.mathworks.com/support/tech-notes/1100/1106.html"&gt;http://www.mathworks.com/support/tech-notes/1100/1106.html&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Get 64-bit MATLAB and a 64-bit machine.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; By the way... love the tags "matlab" and "code".&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
Thakns Helper, &lt;br&gt;
I have realised that, just exporing how to go about doing &lt;br&gt;
this . &lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 07 May 2008 12:06:00 -0400</pubDate>
      <title>Re: overcoming the limit of repmat</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168840#430802</link>
      <author>Loren Shure</author>
      <description>In article &amp;lt;fvr9lm$nkk$1@fred.mathworks.com&amp;gt;, spamless@nospam.com &lt;br&gt;
says...&lt;br&gt;
&amp;gt; "Sourav Roy" &amp;lt;souravroy1@rediffmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;fvr8g7$sep$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi,&lt;br&gt;
&amp;gt; &amp;gt; I tried the below code :- &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt; z = rand(1,(666),10000);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt; x = repmat(z,300,1);&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; The code gave the below error:- &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; ??? Maximum variable size allowed by the program is &lt;br&gt;
&amp;gt; &amp;gt; exceeded.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Error in ==&amp;gt; repmat at 97&lt;br&gt;
&amp;gt; &amp;gt;     B = A(subs{:});&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; While this one worked, &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt; ab = z(:,:,1);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt; z = rand(1,(666),100);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt; x = repmat(z,300,1);&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Kindly suggest how I can overcome this.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; You are trying to create a 300-by-666-by-10000 matrix of &lt;br&gt;
&amp;gt; double precision (8 byte) values.  This requires &lt;br&gt;
&amp;gt; 300*666*10000*8/1024^3 = 14.88 GB of memory.  It ain't &lt;br&gt;
&amp;gt; gonna happen with 32-bit MATLAB.  Check out the following &lt;br&gt;
&amp;gt; technical note:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href="http://www.mathworks.com/support/tech-notes/1100/1106.html"&gt;http://www.mathworks.com/support/tech-notes/1100/1106.html&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Get 64-bit MATLAB and a 64-bit machine.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; By the way... love the tags "matlab" and "code".&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Depending on what you are ultimately trying to achieve, you might be &lt;br&gt;
able to circumvent repmat and still get useful results using bsxfun.&lt;br&gt;
-- &lt;br&gt;
Loren&lt;br&gt;
&lt;a href="http://blogs.mathworks.com/loren/"&gt;http://blogs.mathworks.com/loren/&lt;/a&gt;&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
