From: Olta Çakaj on
How can I avoid the "out of memory" error with Matlab7.5.0 (R2007b) in Windows 7
From: Jan Simon on
Dear Olta!

> How can I avoid the "out of memory" error with Matlab7.5.0 (R2007b) in Windows 7

That is a really general question. Without any details, the only valid answer is: use less memory or install more RAM (or at least increase the virtual memory).

If you'd show us more details of your program, somebody could help more precisely.

Kind regards, Jan
From: Olta Çakaj on
"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <hotuat$mpp$1(a)fred.mathworks.com>...
> Dear Olta!
>
> > How can I avoid the "out of memory" error with Matlab7.5.0 (R2007b) in Windows 7
>
> That is a really general question. Without any details, the only valid answer is: use less memory or install more RAM (or at least increase the virtual memory).
>
> If you'd show us more details of your program, somebody could help more precisely.
>
> Kind regards, Jan



I am using this program, when I get the &#8220;out of memory&#8221; error:

function [z,rt,H] = FOM(A,b,z0,tol,nmax);
% FOM returns the solution of the system Ax=b
% and true residual norm in rt
% b is the right hand side
% z0 the starting solution
% tol the tolerance and
% nmax the maximal number of itertations
i=1; b=b(:); z=z0(:);
r=b-A*z; rnorm=norm(r); rho=rnorm; rt=[];
V(:,i)=r/rho;
while ((rnorm/rho>tol)&(i<=nmax));
V(:,i+1)=A*V(:,i);
H(1:i,i)=V(:,1:i)'*V(:,i+1);
V(:,i+1)=V(:,i+1)-V(:,1:i)*H(1:i,i);
H(i+1,i)=norm(V(:,i+1));
V(:,i+1)=V(:,i+1)/H(i+1,i);
z=z0+V(:,1:i)*(H(1:i,1:i)\[rho;zeros(i-1,1)]);
r=b-A*z; rnorm=norm(r); rt=[rt;rnorm/rho];
i=i+1;
end
% Copyright (C) 2006-2010 Artan Borici.
% This program is a free software licensed under the terms of the GNU
% General Public License

The input for this program is:
size (A)= 262144x262144
b=rand(262144,1);
z0=zeros(262144,1);
nmax=400;
tol=eps;

And the error message is:
>> [z,rt,H] = FOM(A,b,z0,tol,nmax);
??? Out of memory. Type HELP MEMORY for your options.

Error in ==> FOM at 13
H(1:i,i)=V(:,1:i)'*V(:,i+1);

The program has no errors, just some warnings.

Physical Memory (RAM):
In Use: 1417 MB (589bf000)
Free: 1651 MB (67373000)
Total: 3069 MB (bfd32000)

I am using Windows 7 and Matlab 7.5.0 (R2007b)

Thank you.
From: us on
"Olta Çakaj"

> I am using this program, when I get the &#8220;out of memory&#8221; error:

> The input for this program is:
> size (A)= 262144x262144
> b=rand(262144,1);
> z0=zeros(262144,1);

> And the error message is:
> ??? Out of memory. Type HELP MEMORY for your options.

are you surprised(?)...

us
From: Olta Çakaj on
"us " <us(a)neurol.unizh.ch> wrote in message <houquo$72h$1(a)fred.mathworks.com>...
> "Olta Çakaj"
>
> > I am using this program, when I get the &#8220;out of memory&#8221; error:
>
> > The input for this program is:
> > size (A)= 262144x262144
> > b=rand(262144,1);
> > z0=zeros(262144,1);
>
> > And the error message is:
> > ??? Out of memory. Type HELP MEMORY for your options.
>
> are you surprised(?)...
>
> us


I am not surprised, I just want to solve the problem (if it&#8217;s possible) because it&#8217;s a school assignment.