Create a character cell in ascending order
Mostra commenti meno recenti
i want to create a cell of 1000*1 , containing the strings in ascending order.
Let's say variable1, variable2,....variable999,variable1000. How can i do that with for loop?
Risposta accettata
Più risposte (1)
N = 1000;
C = cell(1,N);
for k = 1:N
C{k} = sprintf('variable%d',k);
end
Categorie
Scopri di più su Structures in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!