Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

stored character string to character matrix by using loop

1 Ansicht (letzte 30 Tage)
jarvan
jarvan am 11 Nov. 2014
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I am going to use loop to prompt out 4 course name as 5-character string as form'AB101'. And I need to stored those string in a character matrix course.
n=4;
for i = 1:n
class{i} = input('Enter the course name : ','s')
mymat = [ 'myDataFile' str2num(class{:}) '.mat' ];
save(mymat);
end
str2num('class')
Here, I saved those 4 course by 4 mat file, however, how can I store in one file and switch them to a character matrix?

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by