How to make multiple strings arrays of repeating word and number?

10 Ansichten (letzte 30 Tage)
I need to make an array that is like this:
["var1","var2","var3",...,"var18"]
the size of the array may change (larger or smaller than 18). How can I do that sytematically (not repeating or wiritng each individual array member)?

Akzeptierte Antwort

madhan ravi
madhan ravi am 2 Jul. 2020
n = 18;
"var" + (1:n)

Weitere Antworten (0)

Kategorien

Mehr zu Cell Arrays 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