User Input

2 次查看(过去 30 天)
Colm
Colm 2012-1-5
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
answer = questdlg ( '?', 'Header', 'Yes', 'No', 'Yes' )
strcmp ( answer, 'Yes' )

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dialog Boxes 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by