input prompt
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Chaowei Chen
2011-8-21
for i=1:30
g=input(['enter ' int2str(i) ' th line']);
end
1 个评论
John D'Errico
2019-7-6
+1. But to be picky ... you needed to write it to know that it should be '1st', '2nd', '3rd', etc. ;-)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Trading Technologies 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!