help-octave
[Top][All Lists]
Advanced

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

Re: Loading a big matrix fails (2.0.14)


From: Joao Cardoso
Subject: Re: Loading a big matrix fails (2.0.14)
Date: Mon, 28 Jun 1999 17:53:49 +0100

Thomas Hoffmann wrote:
> 
> With Octave 2.0.14 on HPUX 10.20 I wrote a big (is this big?:
> 
> # type: matrix
> # rows: 5501
> # columns: 16)
> 
> matrix to disk.
> 
> Now I wanted to read this matrix back and issued
> 
> octave:6> load lncupcdat
> 
> but Octave fails with the msg
> 
> error: load: failed to load matrix constant
> error: load: reading file lncupcdat
> error: evaluating index expression near line 6, column 1
> 
> .
> 
> The only remarkable thing with this matrix is that it contains some NaNs.

This is the reason. NaNs and Infs are not read bu Octave, because some
(most) libc or libstdc++ dont implement it. I submited a patch to the
libstdc++ guys, but I guess that it will not be incorporated, because
standards don't specify what to do in that case. If you want to try the
patch, search in the Octave archives.

You can, hoewever, save the matrix in binary, and load it without
problems

octave:1> a=eye(3); a(2,2)=nan;
octave:2> a
a =

    1    0    0
    0  NaN    0
    0    0    1

octave:3> save po a
octave:4> b=a;   
octave:5> clear a
octave:6> load po
error: load: failed to load matrix constant
error: load: reading file po
octave:6> save -binary po a
warning: save: no such variable `a'
octave:7> save -binary po b
octave:8> clear b
octave:9> load po
octave:10> a
error: `a' undefined near line 10 column 1
octave:10> b
b =

    1    0    0
    0  NaN    0
    0    0    1

octave:11> 


Joao

> 
> Has anybody a clue why this goes wrong?
> 
> Thomas Hoffmann.
> 
> ---------------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.  To ensure
> that development continues, see www.che.wisc.edu/octave/giftform.html
> Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
> ---------------------------------------------------------------------

-- 
Joao Cardoso                |   e-mail: address@hidden
INESC, R. Jose Falcao 110   |   tel:    + 351 2 2094322
4050 Porto, Portugal        |   fax:    + 351 2 2008487



---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

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