validateInput

버전 1.0.0.0 (2.5 KB) 작성자: Jed F.
A simple 'getOpts' type script to validate input parameters.
다운로드 수: 700
업데이트 날짜: 2010/4/22

라이선스 보기

validateInput started when creating saveppt2. There was a need to take a large number of inputs, in any order, and make them usable to the script. Checking if an input argument has been passed can be done with isfield or if the 'force' option is enabled if the field is false.

Examples:
varargin={'p','s',10,'name','john doe'};
validParameters={{'size','s'},{'print','p'},'name'};
parameters=validateInput(varargin,validParameters)
parameters =
print: 1
size: 10
name: 'john doe'

varargin={'p'}
validParameters={{'size','s'},{'print','p'},'name'}
parameters=validateInput(varargin,validParameters,true)

parameters =
print: 1
size: 0
name: 0

인용 양식

Jed F. (2024). validateInput (https://www.mathworks.com/matlabcentral/fileexchange/27338-validateinput), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Elementary Polygons에 대해 자세히 알아보기
도움

줌: saveppt2

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0