User Input

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

 采纳的回答

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

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 App Building 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by