inputYN(inputstr)

版本 1.0.0.0 (1.1 KB) 作者: Kouichi Nakamura
inputYN is a wrapper of input.
18.0 次下载
更新时间 2016/2/22

查看许可证

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

EXAMPLE
if inputYN('Do yo want to proceed?')
dsip('OK')
else
dsip('cancelled')
end

% the above code prints the following in the command window
Do yo want to proceed? (Y/N):

See also
input

Written by
Kouichi.C.Nakamura, Ph.D.
Kyoto University
16 Nov 2015

引用格式

Kouichi Nakamura (2024). inputYN(inputstr) (https://www.mathworks.com/matlabcentral/fileexchange/55585-inputyn-inputstr), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2015b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Image Segmentation and Analysis 的更多信息
标签 添加标签

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

remove email