Want to create an array of filenames on every row of a matrix
Mostra commenti meno recenti
I am looking to create an array of file names on every row of a matrix,and I keep getting
"In an assignment A(:) = B, the number of elements in A and B must be the same." or "Assignment has more non-singleton rhs dimensions than non-singleton subscripts"
This is what I have right now:
hello = 0;
for i = 1:8
str = strcat('world',' ', num2str(i))
hello(i,:) = str;
end
hello
Risposta accettata
Più risposte (1)
Stalin Samuel
il 25 Set 2017
Modificato: Stalin Samuel
il 25 Set 2017
%hello = 0;
for i = 1:8
str = [strcat('world',' ', num2str(i))]
hello{i,:} = str;
end
Categorie
Scopri di più su プログラミング 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!