| MATLAB® | ![]() |
#include "matrix.h" bool mxIsNaN(double value);
integer*4 mxIsNaN(value) real*8 value
The double-precision, floating-point number that you are testing
Logical 1 (true) if value is NaN (Not-a-Number), and logical 0 (false) otherwise.
Call mxIsNaN to determine whether or not value is NaN. NaN is the IEEE arithmetic representation for Not-a-Number. A NaN is obtained as a result of mathematically undefined operations such as
0.0/0.0
Inf-Inf
The system understands a family of bit patterns as representing NaN. In other words, NaN is not a single value; rather, it is a family of numbers that MATLAB software (and other IEEE-compliant applications) uses to represent an error condition or missing data.
See mxisfinite.c in the mx subdirectory of the examples directory.
For additional examples, see findnz.c and fulltosparse.c in the refbook subdirectory of the examples directory.
![]() | mxIsLogicalScalarTrue (C) | mxIsNumeric (C and Fortran) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |