help-octave
[Top][All Lists]
Advanced

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

programming help


From: insipido
Subject: programming help
Date: Wed, 17 Nov 2010 14:52:53 -0200

Hi
I am not so good for programing, but I do my best.
I wanted do know if it is possible to obtain in return a numbered variable.
I would like to save in different variables the result of a for cycle.

for example:

a = 5;
b = 2*a;
for i = 1:a
   c = b+i
endfor

the result is:

c=11
c=12
c=13
c=14
c=15

but then, 'c' ends with value =15, but what about I want to save in different variables other results, like:

c1=11
c2=12
c3=13
c4=14
c5=15

and in that way I could easily call them independently.

any idea, please help me.

thanks

victor./



reply via email to

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