FUNCTION REFERENCE
validateattributes
Validate an array's class, shape and values.
Validate an array's class, shape and values.
Syntax
validateattributes(value, classes, attributes [, functionName, argumentName, position])Unknown attribute names warn and are skipped, as in MATLAB. A failed size check has the identifier MATLAB:incorrectSize, or MATLAB:functionName:incorrectSize when a function name is given.
Example
validateattributes([1 2],{'double'},{'row','positive'}); % no outputDifferences from MATLAB: Arrays are two-dimensional, so 3d always passes and ndims passes only for 2. Messages for numel, nrows, ncols, ndims, even, odd, binary and diag are not checked against MATLAB yet.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.