Have MATLAB code pause and then take input from command line

I know 'pause' halts MATLAB code and waits for you to hit 'Enter' before continuing. How can I pause the code, and then have it take an input from the command line. For example, I want the code to run, and then pause before a for loop, and if I put in "1" then the for loop executes one bit of code or if I put in "2" the for loop executes a different bit of code. Thank you.

 採用された回答

dpb
dpb 2014 年 10 月 5 日
編集済み: Image Analyst 2014 年 10 月 5 日

1 投票

doc input % plain text
doc inputdlg % gui dialog box
help iofun
help uitools
for wider scope of choices overall...

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeApp Building についてさらに検索

質問済み:

2014 年 10 月 5 日

編集済み:

2014 年 10 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by