Outspan
Posts:
17
Registered:
7/14/09
|
|
Re: Problem with memory usage (R2009a)
Posted:
Oct 21, 2009 4:39 AM
|
|
On Oct 20, 3:23 pm, Outspan <borghibor...@gmail.com> wrote: > On Oct 20, 2:28 pm, "brijendra kumar" <imb...@gmail.com> wrote: > > > > > "Bruno Luong" <b.lu...@fogale.findmycountry> wrote in message <hbk8au$du...@fred.mathworks.com>... > > > Outspan <borghibor...@gmail.com> wrote in message <32cf3331-9441-4f73-9b6f-f29d3fbf6...@s6g2000vbp.googlegroups.com>... > > > > Hi all, > > > > >... I also use up 300MB of > > > > memory, and I don't understand why. > > > > Because of the REPMAT instruction. > > > > > bars = struct('date', [], 'time', [], 'open', [], 'high', [], 'low', > > > > [], 'close', [], 'volume', []); > > > > bars = repmat(bars, [1 500000]); > > > > Bruno > > > i think memory can be reduce by avoiding while loop because while loop stores all data till end ..... > > just try once... > > I'm not sure whether this is what you mean, but if I try to substitute > the while with a for loop the effect is the same.
Does anyone have any suggestions?
|
|