Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

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

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 the following examples in matlabroot/extern/examples/refbook.

See the following examples in matlabroot/extern/examples/mx.

Introduced before R2006a

Was this topic helpful?