help-octave
[Top][All Lists]
Advanced

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

Re: Save produces large files


From: Søren Hauberg
Subject: Re: Save produces large files
Date: Tue, 14 Jun 2005 17:09:55 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050404)

Hi,
Seems like a solution. I bit much work, but I guess it's the best solution.

/Søren

Miquel Cabanas wrote:
hi,

if the NaN is the culprit, a way to circumvent the problem could
be using  find(isnan(a))  to construct a vector holding the position
of all NaN in your matrix, then replace all NaN with some arbitrary
number before saving the matrix and the NaN-indices vector. Hopefully
you should be able to save the file using the -float-binary option.

You should save the pair matrix and index-vector in the same file to
make sure all information is kept together. Last, you only need to
reverse the process when loading the matrix.

On Tue, Jun 14, 2005 at 04:14:44PM +0200, Søren Hauberg wrote:

a = zeros(3); a(5) = NaN;
octave:25> save -float-binary test.data a

which gives me the following warning:

warning: save: some values too large to save as floats --
warning: save: saving as doubles instead

Btw. I'm using 2.1.71 on linux



Miquel




-------------------------------------------------------------
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]