Check validity of array
validateattributes(A,classes,attributes)
validateattributes(A,classes,attributes,argIndex)
validateattributes(A,classes,attributes,funcName)
validateattributes(A,classes,attributes,funcName,varName)
validateattributes(A,classes,attributes,funcName,varName,argIndex)
validateattributes(
validates
that array A
,classes
,attributes
)A
belongs to at least one of the specified
classes (or its subclass) and has all of the specified attributes.
If A
does not meet the criteria, MATLAB® throws
an error and displays a formatted error message. Otherwise, validateattributes
completes
without displaying any output.
validateattributes(
includes
the position of the input in your function argument list as part of
any generated error messages.A
,classes
,attributes
,argIndex
)
validateattributes(
includes
the specified function name in generated error identifiers.A
,classes
,attributes
,funcName
)
validateattributes(
includes
the specified variable name in generated error messages.A
,classes
,attributes
,funcName
,varName
)
inputParser
| is*
| isa
| isnumeric
| validatestring