This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mxGetNaN (C and Fortran)

Value of NaN (Not-a-Number)

C Syntax

#include "matrix.h"
double mxGetNaN(void);

Fortran Syntax

real*8 mxGetNaN


Value of NaN (Not-a-Number) on your system


Call mxGetNaN to return the value of NaN for your system. NaN is the IEEE® arithmetic representation for Not-a-Number. Certain mathematical operations return NaN as a result, for example,

  • 0.0/0.0

  • Inf-Inf

Your system specifies the value of Not-a-Number. You cannot modify it.

C Examples

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

Introduced before R2006a

Was this topic helpful?