YESNO

let user choose between yes or no
2,3K Descargas
Actualizado 29 abr 2008

Ver licencia

YESNO - returns true for y-key, false for n-key

ISYES = YESNO waits for a keypress of either the Y-key or N-key and returns a logical one (true) if the Y-key was pressed, and a logical zero (false) if the N-key was pressed.

Example:
fprintf('\nHere is a number for you: %5.0f', 1000*rand)
while(1)
fprintf('\nDo you want another number (y/n)? ') ;
if yesno, fprintf(' %5.0f', 1000*rand) ;
else fprintf('\nBye!\n') ;
break
end
end

version 1.0 april 2008

Citar como

Jos (10584) (2026). YESNO (https://es.mathworks.com/matlabcentral/fileexchange/19740-yesno), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R13
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Numeric Types en Help Center y MATLAB Answers.
Agradecimientos

Inspirado por: getkey

Inspiración para: Islanding Detection In Distributed Generation

Versión Publicado Notas de la versión
1.0.0.0