input prompt
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Talaria
am 21 Aug. 2011
Kommentiert: John D'Errico
am 6 Jul. 2019
how to make input function that displays text according to loop:
i.e. for i=1:30
g=input('enter "/i/"th line');
end
and it would display:
enter 1th line
enter 2th line
enter 3th line etc.....
0 Kommentare
Akzeptierte Antwort
Chaowei Chen
am 21 Aug. 2011
for i=1:30
g=input(['enter ' int2str(i) ' th line']);
end
1 Kommentar
John D'Errico
am 6 Jul. 2019
+1. But to be picky ... you needed to write it to know that it should be '1st', '2nd', '3rd', etc. ;-)
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!