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

조회 수: 8 (최근 30일)
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)?

채택된 답변

madhan ravi
madhan ravi 2020년 7월 2일
n = 18;
"var" + (1:n)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by