Saving temporal variables
Oscar Bayona Candel
oscarbayonacandel at hotmail.com
Thu Nov 13 06:07:51 CST 2008
Hi,
I have tried your solution but in my code but an error appears:
error: invalid vector index = 0error: assignment failed, or no method for `matrix = scalar'error: evaluating assignment expression near line 44, column 17error: evaluating for command near line 6, column 1
line 6 is the line for i=1:5
my code work if I put for 1=1:2
but it I put for i=1:3 the message appears
I thought it was the 3trd calculus was wrong but if I for i=3:3 it works.
Can you help me to understand where is the error.
> Subject: Re: Saving temporal variables> From: soren at hauberg.org> To: oscarbayonacandel at hotmail.com> CC: help-octave at cae.wisc.edu> Date: Wed, 12 Nov 2008 14:28:40 +0100> > ons, 12 11 2008 kl. 14:18 +0100, skrev Oscar Bayona Candel:> > Hi all,> > > > I have created a simply program like this:> > > > > > for i=1:5> > > > A=ones(10,1)+randn(10,1);> > > > end> > > > I want to save each A(i) matrix created in a ascii document or a xls > > > > If I put > > > > save Data A> > > > It only saves the last A matrix how can I save these "temporal"> > matrices.> > How about saving your matrices in a cell array, and then saving that?> > C = cell (1, 5);> for i=1:5> A=ones(10,1)+randn(10,1); > C {i} = A;> end> > save myfile.mat C> > Søren>
_________________________________________________________________
Los más de lo más, Especial Rankings
http://events.es.msn.com/dinero/listas/default.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20081113/2c31a26d/attachment.html
More information about the Help-octave
mailing list