YESNO

let user choose between yes or no
2,3K téléchargements
Mise à jour 29 avr. 2008

Afficher la licence

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

Citation pour cette source

Jos (10584) (2025). YESNO (https://fr.mathworks.com/matlabcentral/fileexchange/19740-yesno), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R13
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Numeric Types dans Help Center et MATLAB Answers
Remerciements

Inspiré par : getkey

A inspiré : Islanding Detection In Distributed Generation

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0