help-octave
[Top][All Lists]
Advanced

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

dynamic list of variable names


From: Colin Ingram
Subject: dynamic list of variable names
Date: Fri, 16 Sep 2005 12:58:37 -0500
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

How does one create a dynamic list of variables names at runtime.  So I'd like 
to do something like

nr = some_function(x,y)
for i = 1:nr
["some_variable_name" , "i"] = someother_function (i)
end

Which you obviously can't do since you can't have string concatenation on the 
left side of the assignment operator.

It seams like I might be able to work something up using a variable list of 
return values from a function but I can't see how to do this.  Is it even 
possible or am I stuck using a structure or cell to hold my data?



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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