inputYN is a wrapper of input. Ask question with Y or N for the answer to
get true or false output, respectively. To interrupt, if you type
'keyboard' in response you can enter debugging mode.
TF = inputYN(inputstr)
inputstr String for a question. ' (Y/N):' will be added at the end.
TF A logical output. true is for Y or y, false is for N or n
if inputYN('Do yo want to proceed?')
% the above code prints the following in the command window
Do yo want to proceed? (Y/N):
16 Nov 2015
Kouichi Nakamura (2022). inputYN(inputstr) (https://www.mathworks.com/matlabcentral/fileexchange/55585-inputyn-inputstr), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!