How can I get dynamic naming variables? So in a loop i need variables with names A1,A2,A3...... logic?
1 view (last 30 days)
Show older comments
Answers (1)
CS Researcher
on 1 May 2016
You can use eval. Try this:
for i = 1:10
eval(['A' num2str(i) ' = i;']);
end
2 Comments
See Also
Categories
Find more on Variables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!