Want to create an array of filenames on every row of a matrix
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (1)
Stalin Samuel
am 25 Sep. 2017
Bearbeitet: Stalin Samuel
am 25 Sep. 2017
%hello = 0;
for i = 1:8
str = [strcat('world',' ', num2str(i))]
hello{i,:} = str;
end
Kategorien
Mehr zu プログラミング finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!