Appending string to Matlab array

You need to use cell arrays. If the number of iterations are known beforehand, I suggest you preallocate:

N = 10;
names = cell(1,N);
for i=1:N
    names{i} = 'string';
end

otherwise you can do something like:

names = {};
for i=1:10
    names{end+1} = 'string';
end

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)