From: Oleg Komarov on
"Olta Çakaj" <oltacakaj(a)gmail.com> wrote in message <houtec$h04$1(a)fred.mathworks.com>...
> "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.ù

Use the backslash operator \ instead of
H(1:i,i)=V(:,1:i)'*V(:,i+1);
V(:,i+1)=V(:,i+1)-V(:,1:i)*H(1:i,i);

Or QR decomposition.

Oleg
From: Bruno Luong on
Is it GMRES method?

Two suggestions: preallocate your array before while loop. Store V by chunk or cell arrays instead of big array.

I'm still surprised the assignment must be carried out on such big matrix.

Bruno
From: Olta Çakaj on
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <houuni$pdt$1(a)fred.mathworks.com>...
> Is it GMRES method?
>
> Two suggestions: preallocate your array before while loop. Store V by chunk or cell arrays instead of big array.
>
> I'm still surprised the assignment must be carried out on such big matrix.
>
> Bruno



Thank you very much for your replies, I solved the problem.