I want
D_N = {'K1'; 'K2'; '…' ;'K9' ; '…'};
until Kn is reached with n equal to a parameter of my program (for example 39).
I can chose to use:
for ii = 1:39 D_N{ii} = sprintf('K%d', ii);endfor ii = 1:39 D_N{ii} = ['K' num2str(ii)];end
But is there a way without using this stupid loop?
Best Answer