|
From: Sourav Roy on 6 May 2008 23:43 Hi, I tried the below code :- >> z = rand(1,(666),10000); >> x = repmat(z,300,1); The code gave the below error:- ??? Maximum variable size allowed by the program is exceeded. Error in ==> repmat at 97 B = A(subs{:}); While this one worked, >> ab = z(:,:,1); >> z = rand(1,(666),100); >> x = repmat(z,300,1); Kindly suggest how I can overcome this.
From: helper on 7 May 2008 00:03 "Sourav Roy" <souravroy1(a)rediffmail.com> wrote in message <fvr8g7$sep$1(a)fred.mathworks.com>... > Hi, > I tried the below code :- > >> z = rand(1,(666),10000); > >> x = repmat(z,300,1); > > The code gave the below error:- > > ??? Maximum variable size allowed by the program is > exceeded. > > Error in ==> repmat at 97 > B = A(subs{:}); > > While this one worked, > > >> ab = z(:,:,1); > >> z = rand(1,(666),100); > >> x = repmat(z,300,1); > > Kindly suggest how I can overcome this. You are trying to create a 300-by-666-by-10000 matrix of double precision (8 byte) values. This requires 300*666*10000*8/1024^3 = 14.88 GB of memory. It ain't gonna happen with 32-bit MATLAB. Check out the following technical note: http://www.mathworks.com/support/tech-notes/1100/1106.html Get 64-bit MATLAB and a 64-bit machine. By the way... love the tags "matlab" and "code".
From: Sourav Roy on 7 May 2008 00:43 "helper " <spamless(a)nospam.com> wrote in message <fvr9lm$nkk$1(a)fred.mathworks.com>... > "Sourav Roy" <souravroy1(a)rediffmail.com> wrote in message > <fvr8g7$sep$1(a)fred.mathworks.com>... > > Hi, > > I tried the below code :- > > >> z = rand(1,(666),10000); > > >> x = repmat(z,300,1); > > > > The code gave the below error:- > > > > ??? Maximum variable size allowed by the program is > > exceeded. > > > > Error in ==> repmat at 97 > > B = A(subs{:}); > > > > While this one worked, > > > > >> ab = z(:,:,1); > > >> z = rand(1,(666),100); > > >> x = repmat(z,300,1); > > > > Kindly suggest how I can overcome this. > > You are trying to create a 300-by-666-by-10000 matrix of > double precision (8 byte) values. This requires > 300*666*10000*8/1024^3 = 14.88 GB of memory. It ain't > gonna happen with 32-bit MATLAB. Check out the following > technical note: > > http://www.mathworks.com/support/tech-notes/1100/1106.html > > Get 64-bit MATLAB and a 64-bit machine. > > By the way... love the tags "matlab" and "code". > > Thakns Helper, I have realised that, just exporing how to go about doing this .
From: Loren Shure on 7 May 2008 08:06 In article <fvr9lm$nkk$1(a)fred.mathworks.com>, spamless(a)nospam.com says... > "Sourav Roy" <souravroy1(a)rediffmail.com> wrote in message > <fvr8g7$sep$1(a)fred.mathworks.com>... > > Hi, > > I tried the below code :- > > >> z = rand(1,(666),10000); > > >> x = repmat(z,300,1); > > > > The code gave the below error:- > > > > ??? Maximum variable size allowed by the program is > > exceeded. > > > > Error in ==> repmat at 97 > > B = A(subs{:}); > > > > While this one worked, > > > > >> ab = z(:,:,1); > > >> z = rand(1,(666),100); > > >> x = repmat(z,300,1); > > > > Kindly suggest how I can overcome this. > > You are trying to create a 300-by-666-by-10000 matrix of > double precision (8 byte) values. This requires > 300*666*10000*8/1024^3 = 14.88 GB of memory. It ain't > gonna happen with 32-bit MATLAB. Check out the following > technical note: > > http://www.mathworks.com/support/tech-notes/1100/1106.html > > Get 64-bit MATLAB and a 64-bit machine. > > By the way... love the tags "matlab" and "code". > > > Depending on what you are ultimately trying to achieve, you might be able to circumvent repmat and still get useful results using bsxfun. -- Loren http://blogs.mathworks.com/loren/
|
Pages: 1 Prev: Speeding up sum of squares Next: xtick overlapped in plotyy. |