FUNCTION REFERENCE

mustBeA

Validate that value is of a specified data type.

Validate that value is of a specified data type.

Syntax

mustBeA(A, classNames)

Throws an error if A is not an instance of any class in classNames.

Example

mustBeA(int8(1), "numeric")

Differences from MATLAB: None.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.