How to enter characters in cell array ?
Mostra commenti meno recenti
I would like to create a cell array with the following output
A = a_1 a_2 a_3 a_4 ....... a_99
I am trying to use the loop method but it's not working. Can anyone help?
A=[];
for i= 1:99
A = [A, 'a_i']
end
Risposta accettata
Più risposte (1)
Azzi Abdelmalek
il 29 Mag 2016
A=sprintf('a_%d',1:99)
Categorie
Scopri di più su Logical 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!