From help-octave-request at bevo dot che dot wisc dot edu Fri Jan 16 12:40:31 2004 Subject: Re: Cannot load a binary file From: "Henry F. Mollet" To: "John W. Eaton" CC: Octave_post Date: Fri, 16 Jan 2004 10:39:50 -0800 on 1/15/04 8:28 PM, John W. Eaton at jwe at bevo dot che dot wisc dot edu wrote: > On 6-Jan-2004, Henry F. Mollet wrote: > > | I can save a file as a binary but not load it? > | Henry > | > | octave:89> a = [1,2;3,4]; > | octave:90> whos > | > | *** local user variables: > | > | prot type rows cols name > | ==== ==== ==== ==== ==== > | rwd matrix 2 2 a > | > | octave:91> save testasciidefault > | octave:92> clear all > | octave:93> whos > | octave:94> load testasciidefault > | octave:95> whos > | > | *** local user variables: > | > | prot type rows cols name > | ==== ==== ==== ==== ==== > | rwd matrix 2 2 a > | > | octave:96> save -binary testbinary > | octave:97> clear all > | octave:98> whos > | octave:99> load -binary testbinary > | error: load: trouble reading binary file `testbinary' > | > | I've tried the same with -matbinary with the same result. > > What system are you using? > > What version of Octave? > > This does not appear to be a problem with 2.1.50 or the current CVS > sources on a Debian system. > > From other posts, I seem to remember that you are using Mac OS X. > Perhaps the problem is due to an old bug in the C or C++ library on > that system that causes binary reads to report the wrong number of > bytes or the wrong status at EOF (I can't remember the precise details > of the bug, just that there was one -- maybe someone else remembers > more can provide additional information). > > jwe > > Your remember correctly: GNU Octave, version 2.1.46 (powerpc-apple-darwin6.8). Thanks for pointing to the potential problem. Henry ------------------------------------------------------------- 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 -------------------------------------------------------------