Main Content

mxIsScalar (C)

Determine whether array is scalar array

C Syntax

#include "matrix.h"
bool mxIsScalar(const mxArray *array_ptr);

Arguments

array_ptr

Pointer to an mxArray

Returns

Logical 1 (true) if the mxArray has 1-by-1 dimensions. Otherwise, it returns logical 0 (false).

Note

Only use mxIsScalar for mxArray classes with IDs documented by mxClassID.

Example

See these examples in matlabroot/extern/examples/mx:

Introduced in R2015a