help-octave
[Top][All Lists]
Advanced

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

Re: isnumeric (NaN) = true !?


From: James Sherman Jr.
Subject: Re: isnumeric (NaN) = true !?
Date: Thu, 25 Mar 2010 10:04:01 -0400

It is my understanding that isnumeric has to do with the format/type of the data, not the actual value of the data.  And "NaN"  I believe is technically of type float.  The isnumeric function is used (or at least when I've used it) to distinguish between arrays of floats/ints versus other stuff (structures, characters, cell arrays, etc)

If you want to tell if there are NaNs in your array, use the isnan function.

Hope this helps.

On Thu, Mar 25, 2010 at 9:40 AM, Matthias Brennwald <address@hidden> wrote:
Dear all

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?

Matthias


----
Matthias Brennwald, Käferholzstrasse 173, CH-8046 Zürich, +41 44 364 17 03


_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

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