inputParser
- :
p =inputParser()¶ Create an object that validates and collects the arguments of a function.
Declare arguments with
addRequired,addOptional,addParameterandaddSwitch, then callparsewith the caller’s arguments. The values are available in the structp.Results;p.UsingDefaultslists the declared optional arguments that were not supplied andp.Unmatchedcollects unrecognised name/value pairs whenKeepUnmatchedis true.The object is a handle: methods change it in place. Settable properties are
CaseSensitive,FunctionName,KeepUnmatched,PartialMatchingandStructExpand.