input prompt

4 ビュー (過去 30 日間)
Talaria
Talaria 2011 年 8 月 21 日
コメント済み: John D'Errico 2019 年 7 月 6 日
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.....

採用された回答

Chaowei Chen
Chaowei Chen 2011 年 8 月 21 日
for i=1:30
g=input(['enter ' int2str(i) ' th line']);
end
  1 件のコメント
John D'Errico
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 ExchangeTrading Technologies についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by