From bug-request at octave dot org Wed Dec 15 13:37:35 2004 Subject: Possible Error in -ascii save/restore From: "John W. Eaton" To: Cc: Date: Wed, 15 Dec 2004 14:38:22 -0500 On 15-Dec-2004, Hallvard dot Paulsen at wartsila dot com wrote: | Description: | ----------- | | * It looks to me like there is a problem when saving/loading variables to file in -ascii mode | | Repeat-By: | --------- | $ octave | GNU Octave, version 2.1.63 (i686-pc-cygwin). | Copyright (C) 2004 John W. Eaton. | This is free software; see the source code for copying conditions. | There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or | FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. | | Additional information about Octave is available at http://www.octave.org. | | Please contribute if you find this software useful. | For more information, visit http://www.octave.org/help-wanted.html | | Report bugs to (but first, please read | http://www.octave.org/bugs.html to learn how to write a helpful report). | | octave:1> Vector=[1, 2, 3] | Vector = | | 1 2 3 | | octave:2> save -ascii vector.dat Vector | octave:3> load -ascii vector.dat Vector | error: load: failed to extract number of rows and columns | error: load: trouble reading ascii file `vector.dat' | error: load: reading file vector.dat | octave:3> save -binary vector.dat Vector | octave:4> load -binary -force vector.dat Vector | octave:5> Vector | Vector = | | 1 2 3 | | octave:6> | | Fix: | --- | | Well, I'm a newbee with octave, so I guess I cannot contribute much here. It looks like binary save works, so I'll use that for the time being. It may also be a cygwin specific bug. I see the problem, but I don't know of a quick fix. When you installed Cygwin, did you choose to mount the filesystems in text mode? If so, then I think you can mount the filesystems in binary mode to avoid the bug. 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 -------------------------------------------------------------