フィルターのクリア

After running a script i got answer in command window, now how can i run it again from command window?

2 ビュー (過去 30 日間)
I want to write a program so that after running it give desired output of some algorithm and display result in command window. and then ask **'do you want to run again Y/N'****. if i select Y it execute the program again. and if 'N' is selected it will not do any thing.
how i solve this because in C-programming we have do-while loop which i find easy. But here i can't find such.
plz help with code. and sufficient description.

採用された回答

Image Analyst
Image Analyst 2013 年 3 月 4 日
Here's one way:
button = 'Continue';
while strcmpi(button, 'Continue')
promptMessage = sprintf('Do you want to Continue processing,\nor Cancel to abort processing?');
titleBarCaption = 'Continue?';
button = questdlg(promptMessage, titleBarCaption, 'Continue', 'Cancel', 'Continue');
if strcmpi(button, 'Cancel')
break;
end
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by