Validate Data

Determine type or characteristic of array data

Use these functions to validate input arguments.

C Functions

expand all

mxIsDoubleDetermine whether mxArray represents data as double-precision, floating-point numbers
mxIsSingleDetermine whether array represents data as single-precision, floating-point numbers
mxIsComplexDetermine whether data is complex
mxIsNumericDetermine whether array is numeric
mxIsInt64Determine whether array represents data as signed 64-bit integers
mxIsUint64Determine whether array represents data as unsigned 64-bit integers
mxIsInt32Determine whether array represents data as signed 32-bit integers
mxIsUint32Determine whether array represents data as unsigned 32-bit integers
mxIsInt16Determine whether array represents data as signed 16-bit integers
mxIsUint16Determine whether array represents data as unsigned 16-bit integers
mxIsInt8Determine whether array represents data as signed 8-bit integers
mxIsUint8Determine whether array represents data as unsigned 8-bit integers
mxIsScalarDetermine whether array is scalar array
mxIsCharDetermine whether input is mxChar array
mxIsLogicalDetermine whether array is of type mxLogical
mxIsLogicalScalarDetermine whether scalar array is of type mxLogical
mxIsLogicalScalarTrueDetermine whether scalar array of type mxLogical is true
mxIsSparseDetermine whether input is sparse array
mxIsStructDetermine whether input is structure array
mxIsCellDetermine whether input is cell array
mxIsClassDetermine whether array is object of specified class
mxIsInfDetermine whether input is infinite
mxIsFiniteDetermine whether input is finite
mxIsNaNDetermine whether input is NaN (Not-a-Number)
mxIsEmptyDetermine whether array is empty
mxIsFromGlobalWSDetermine whether array was copied from MATLAB global workspace
mxAssertCheck assertion value for debugging purposes
mxAssertSCheck assertion value without printing assertion text

Topics

Pass Scalar Values

This example shows how to write a MEX file that passes scalar values.