help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NaN problem


From: Gordon Haverland
Subject: Re: NaN problem
Date: Wed, 8 Aug 2018 07:53:55 -0700

On Wed, 8 Aug 2018 08:58:59 -0500 (CDT)
shivax <address@hidden> wrote:

>  gg=NaN
> 
> >> gg!=NaN  
> ans =  1
> 
> 
> it's possible? 

NaN is to be assigned to a computation, when the result of an operation
is not well defined.  There are many ways to produce answers which are
not well defined.  Because of this, one NaN does not (necessarily) equal
another NaN.  Octave provides a function which will tell you if the
result is NaN (isnan).

> Mapping Function: isnan (x)

>    Return a logical array which is true where the elements of x are
>    NaN values and false where they are not.

>    NA values are also considered NaN values. For example:

>    isnan ([13, Inf, NA, NaN])
>          ⇒ [ 0, 0, 1, 1 ]

Gord




reply via email to

[Prev in Thread] Current Thread [Next in Thread]