(Not recommended) Add optional name-value pair argument into input parser scheme
addParamValue
is not recommended. Use addParameter
instead.
addParamValue(
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
addParamValue
corresponds to two input arguments: one for
the name and one for the value.
addParamValue(
specifies a validation function for the input argument.p
,paramName
,defaultVal
,validationFcn
)
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
.