get_yes_or_no

Prompt user to provide a yes-or-no answer, with an optional default value.
2K descargas
Actualizado 18 jun 2009

Ver licencia

get_yes_or_no(prompt,default) displays a prompt and reads a response from standard input. If the response is 'y', 'yes', 'Y', or "yes", a value of 1 is returned. If the response is 'n', 'no', 'N', or 'NO', a value of 0 is returned. If the user types 'quit' or 'exit', the program is stopped. If the user does not provide input and the optional default argument is present, the default value is returned. If none of these conditions is satisfied, an error message is generated and the prompt is displayed again.

Citar como

Phillip M. Feldman (2024). get_yes_or_no (https://www.mathworks.com/matlabcentral/fileexchange/24037-get_yes_or_no), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2009a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Low-Level File I/O en Help Center y MATLAB Answers.
Agradecimientos

Inspiración para: CORE: Conceptual Optimization of Rotorcraft Environment

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.1.0.0

Version 2.1 implements workaround for Matlab compiler bug involving strtrim. (strtrim dies when the input string is empty).

1.0.0.0