[Top][All Lists]

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

NaN and missing values

From: John W. Eaton
Subject: NaN and missing values
Date: Thu, 23 Sep 1999 12:51:08 -0500 (CDT)

On 23-Sep-1999, heberf <address@hidden> wrote:

| Would NaN be an acceptable code [to indicate missing data] or do we
| need another?

Overloading NaN to mean `missing data' seems wrong to me, because NaNs
can be generated for other reasons too, and if you just see a NaN,
there would be no way to tell if it came from a calculation or because
it was intended to fill the location of a missting datum.

I think the right solution is to create a (set of) new numeric data
type(s) that can also have markers for missing data.  One possible
implementation for a matrix with missing values would be to use the
Matrix data type but also add an additional vector (or matrix) to mark
the locations of missing data.  Any functions that need to work with
this new data type would have to be modified to use it.  Functions not
modified to work with it would just signal `wrong type' errors.


Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see
Instructions for unsubscribing:

reply via email to

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