variable name with variation
Show older comments
I have a very basic question. I want to write a loop in MATLAB which creates 4 separate variables with "a" number "in the name" and put 22 in each of them. Something like this:
for a=1:4
star'{a}'=22
end
But this does not seem to identify "a" separately and not as a part of the variable name. How should I use syntax to do that?
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing 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!