[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
append numbers to variable
From: |
the_verge |
Subject: |
append numbers to variable |
Date: |
Wed, 6 Sep 2006 17:25:37 -0700 (PDT) |
I have a question related to my last one, but it's slightly different:
What I would like to do is, in a for loop, create a new variable with the
current index of the loop appended. For example:
x=0;
for i=1:5
x[append number i] = x+i;
endfor
It should output the following:
x1 = 1
x2 = 2
x3 = 3
x4 = 4
x5 = 5
So the for loop should have created 5 new variables and assigned them
values.
Any ideas?
--
View this message in context:
http://www.nabble.com/append-numbers-to-variable-tf2230364.html#a6182168
Sent from the Octave - General forum at Nabble.com.
- append numbers to variable,
the_verge <=