User Input

2 Ansichten (letzte 30 Tage)
Colm
Colm am 5 Jan. 2012
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

Akzeptierte Antwort

Robert Cumming
Robert Cumming am 5 Jan. 2012
answer = questdlg ( '?', 'Header', 'Yes', 'No', 'Yes' )
strcmp ( answer, 'Yes' )

Weitere Antworten (0)

Kategorien

Mehr zu Dialog Boxes finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by