help-octave
[Top][All Lists]
Advanced

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

Re: isnumeric (NaN) = true !?


From: Søren Hauberg
Subject: Re: isnumeric (NaN) = true !?
Date: Thu, 25 Mar 2010 09:21:02 -0700

tor, 25 03 2010 kl. 14:40 +0100, skrev Matthias Brennwald:
> What is the logic behind this:
> 
>       isnumeric (NaN) = 1
> 
> I believe that "NaN" means "not a number". How can something which is
> "not a number" be numeric? What is the logic behind this?

I wouldn't exactly call it logic, but one reason for this behaviour is
that Matlab does the same.

In general, when it comes to NaN's you have to deal with them using
'isnan'.

Søren




reply via email to

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