This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

mxIsScalar (C)

Determine whether array is scalar array

C Syntax

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



Pointer to an mxArray


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


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


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

Introduced in R2015a