I basically ask a user to enter Yes or No in a message box. How do I either convert their answer into a value of 1 for Yes, yes or Y? Thanks

 採用された回答

Robert Cumming
Robert Cumming 2012 年 1 月 5 日

1 投票

answer = questdlg ( '?', 'Header', 'Yes', 'No', 'Yes' )
strcmp ( answer, 'Yes' )

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Dialog Boxes についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by