[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Referencing variable within a new variable
From: |
epetting |
Subject: |
Referencing variable within a new variable |
Date: |
Thu, 25 Apr 2013 10:41:49 -0700 (PDT) |
Greetings,
I am having a basic issue doing the following:
Where data is a document
for tag=1:4
GS_$tag=data{tag}
end
So that GS_1=data{1} , GS_2=data{2} , etc?
I've also tried: sprintf('GS_%d',tag)=data{tag};
And while sprintf('GS_%d',tag) creates the variable GS_1 etc, the above does
not store data from data{1} to this variable (there is a dimensions
mismatch)
Thanks in advance!
--
View this message in context:
http://octave.1599824.n4.nabble.com/Referencing-variable-within-a-new-variable-tp4652319.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Referencing variable within a new variable,
epetting <=