| MATLAB Application Program Interface | Search  Help Desk |
| mxIsDouble | Examples See Also |
True if mxArray represents its data as double-precision, floating-point numbers
C Syntax
#include "matrix.h" bool mxIsDouble(const mxArray *array_ptr);
Arguments
array_ptrmxArray.
Returns
true if the mxArray stores its data as double-precision, floating-point numbers; otherwise, returns false.
Description
CallmxIsDouble to determine whether or not the specified mxArray represents its real and imaginary data as double-precision, floating-point numbers.
Older versions of MATLAB store all mxArray data as double-precision, floating-point numbers. However, starting with MATLAB 5, MATLAB can store real and imaginary data in a variety of numerical formats.
Calling mxIsDouble is equivalent to calling
mxGetClassID(array_ptr == mxDOUBLE_CLASS)
Examples
Seefindnz.c, fulltosparse.c, timestwo.c, and xtimesy.c in the refbook subdirectory of the examples directory.
For additional examples, see mexget.c, mexlock.c, mexsettrapflag.c, and yprime.c in the mex subdirectory of the examples directory; see mxcalcsinglesubscript.c, mxgeteps.c, mxgetinf.c, and mxisfinite.c in the mx subdirectory of the examples directory.
See Also
mxIsClass, mxGetClassID