mxIsDouble (C and Fortran)

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

C Syntax

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

Fortran Syntax

#include "fintrf.h"
integer*4 mxIsDouble(pm)
mwPointer pm

Arguments

pm

Pointer to an mxArray

Returns

Logical 1 (true) if the mxArray stores its data as double-precision, floating-point numbers, and logical 0 (false) otherwise.

Description

Call mxIsDouble to determine whether the specified mxArray represents its real and imaginary data as double-precision, floating-point numbers.

Older versions of MATLAB® software 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 various numerical formats.

In C, calling mxIsDouble is equivalent to calling:

mxGetClassID(pm) == mxDOUBLE_CLASS

In Fortran, calling mxIsDouble is equivalent to calling:

mxGetClassName(pm) .eq. 'double'

Examples

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

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

Introduced before R2006a