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);

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