Check validity of array
validateattributes(
validates that array A
,classes
,attributes
)A
belongs to at least one of the specified classes (or its subclass) and has all the specified attributes. If A
does not meet the criteria, then 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
)
arguments
| inputParser
| is*
| isa
| isnumeric
| validatestring