Main Content

mxIsDouble (C)

Determine whether mxArray represents data as double-precision, floating-point numbers

C Syntax

#include "matrix.h"
bool mxIsDouble(const mxArray *pm);


mxIsDouble returns logical 1 (true) if the mxArray stores its real and imaginary data as double-precision, floating-point numbers. Otherwise, it returns logical 0 (false).

Older versions of MATLAB® store all mxArray data as double-precision, floating-point numbers. However, starting with MATLAB Version 5 software, MATLAB can store real and imaginary data in other numerical formats.

In C, calling mxIsDouble is equivalent to calling:

mxGetClassID(pm) == mxDOUBLE_CLASS

Input Arguments

expand all

Pointer to an mxArray array, specified as const mxArray*.


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

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

Version History

Introduced before R2006a