help-octave
[Top][All Lists]
Advanced

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

NaNs in ascii


From: John W. Eaton
Subject: NaNs in ascii
Date: Mon, 28 Oct 2002 15:11:36 -0600

On 26-Oct-2002, Mike Miller <address@hidden> wrote:

| What am I doing wrong?  Here's what happens:
| 
| # echo '1 NaN' > junk.txt
| # octave
| octave:1> load junk.txt
| octave:2> disp(junk)
|   1  1
| 
| So the NaN has become a 1.
| 
| Even when I create the data in octave and use save -ascii, I can't bring
| it back in using load -ascii when there is a NaN in the matrix.

As other people noted, whether this works properly depends on the I/O
functions in the C++ library, so it is OS-dependent.

Since missing values have been added to Octave and we know that they
are not going to be handled properly on any system by default, we
might as well fix Octave to handle the Inf and NaN values too.  I've
just checked in some changes to CVS that should help.  I also posted
the patch to the octave-maintainers mailing list (you can find it in
the mailing list archive on the Octave web pages) if you'd like to try
patching your version of Octave.  But it would probably make more
sense to install from CVS, or wait for 2.1.38.

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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