addParameter
Add optional name-value pair argument into input parser scheme
Syntax
Description
addParameter(
adds the parameter name of an optional name-value pair argument into the input
parser scheme. When the inputs to a function do not include this optional name-value
pair, the input parser assigns p
,paramName
,defaultVal
)paramName
the value
defaultVal
.
Unlike positional inputs added with the addRequired
and
addOptional
functions, each parameter added with
addParameter
corresponds to two input arguments: one for
the name and one for the value.
addParameter(
specifies a validation function for the input argument.p
,paramName
,defaultVal
,validationFcn
)
addParameter(___,'PartialMatchPriority',
specifies the priority for the partial matching of conflicting parameter names. The
input parser scheme selects lower priority values over higher ones. Use this option
with any of the input argument combinations in the previous syntaxes.matchPriorityValue
)
Examples
Input Arguments
Tips
Parameter name-value pairs are optional inputs. When calling the function, name-value pairs can appear in any order after positional arguments. They take the general form
Name1,Value1,...,NameN,ValueN
.
Version History
Introduced in R2013b