get_yes_or_no

버전 1.1.0.0 (1.78 KB) 작성자: Phillip M. Feldman
Prompt user to provide a yes-or-no answer, with an optional default value.
다운로드 수: 2K
업데이트 날짜: 2009/6/18

라이선스 보기

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.

인용 양식

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

MATLAB 릴리스 호환 정보
개발 환경: R2009a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Low-Level File I/O에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
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