Why i can't request user sting input?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
n = input('Enter the number of students');
for i=1:1:n
name(i) = input('What is your name? :','s');
end
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 12 Mär. 2012
Since the names may be different lengths name needs to be a cell array. Try name{i} instead of name(i).
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Types finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!