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