making loop that defines variables

1 Ansicht (letzte 30 Tage)
Talaria
Talaria am 10 Aug. 2011
how to make a loop that would output variables and result the following:
code example: for i=1:x y'i'= 2*i end
output example:
y1=2 y2=4 y3=6 y4=8 ......etc.. where y1 to y10 are all variables created and defined by the loop itself.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 10 Aug. 2011

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by