help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initializing variables


From: Sergei Steshenko
Subject: Re: Initializing variables
Date: Sat, 21 Jun 2008 09:11:44 -0700 (PDT)


Applications From Scratch: http://appsfromscratch.berlios.de/


--- On Sat, 6/21/08, Ben Abbott <address@hidden> wrote:

> From: Ben Abbott <address@hidden>
> Subject: Re: Initializing variables
> To: address@hidden
> Cc: address@hidden, address@hidden
> Date: Saturday, June 21, 2008, 6:42 AM
> On Jun 21, 2008, at 12:23 AM, Sergei Steshenko wrote:
> >
> > Applications From Scratch:
> http://appsfromscratch.berlios.de/
> >
> > --- On Fri, 6/20/08, asha g <address@hidden>
> wrote:
> >
> >> From: asha g <address@hidden>
> >> Subject: Initializing variables
> >> To: address@hidden
> >> Date: Friday, June 20, 2008, 5:06 PM
> >> I have a program with several variables - all are
> vectors or
> >> matrices.
> >>
> >> Now do I initialize the ones I need to save and
> plot at the
> >> beginning of the program  or all the variables
> that are used
> >> in the program?
> >> eg - if I need vvvv and abhh do I just write:
> >>
> >> vvvv= zeros(niter, N); abhh = zeros(niter,N);
> >>
> >> before the start of the script file or shd I do
> that to
> >> each one of them. When niter is large and N is
> large, this
> >> takes up lots of space and slows down operations.
> However,
> >> when I don't do it to all the variables I am
> not sure
> >> what is going on especially as there are many
> loops inside.
> >>
> >> I hope this is clear.
> >> Thanks
> >> Asha
> >
> > Your memory consumption is proportional to
> 'niter'.
> >
> > And why do you need it to be this way ?
> >
> > Regards,
> >  Sergei.
> 
> Sergei,
> 
> Are you asking why Asha is saving the values of
> "vvvv", "abhh", etc,  
> for each iteration?

Yes.

I meant that for debugging/analysis results of every iteration can
be stored on disk, so there will be no high memory consumption.

> 
> Asha, do you use the contents of "vvvv",
> "abhh", etc after the final  
> iteration?
> 
> Ben

--Sergei.


      


reply via email to

[Prev in Thread] Current Thread [Next in Thread]