|
From: | Dmitri A. Sergatskov |
Subject: | Re: Skipping comments in load files |
Date: | Tue, 05 Oct 2004 22:17:56 -0600 |
User-agent: | Mozilla Thunderbird 0.8 (X11/20040913) |
Joe Koski wrote: ...
octave:1> b = load("A1_714_raw.txt"); error: load: A1_714_raw.txt: inconsistent number of columns near line 6001 error: load: unable to extract matrix size from file `A1_714_raw.txt' error: evaluating assignment expression near line 1, column 3 and of course, looking at the file in my editor didn't show that there was an extra space in line 6001. When I deleted the space, the problem went away. Apparently I had previously fixed that problem in the file where I had stripped the header information.
I suspect that was not the blank line (or space) -- it works for me with either of them, but some special character like ^Z or something. It definitely breaks for me with ^Z at the end of the file. You can check with "od" if it included with MacOS. address@hidden octave]$ od -c b 0000000 # t h i s i s s o m e c ....<deleted>... 0000140 s h e r e \n 4 8 \n 5 1 0 \n 0000160 032 \n 0000162 032 is octal number for Ctrl-Z character. octave:1> load b error: load: b: inconsistent number of columns near line 6 error: load: unable to extract matrix size from file `b' If I replace ^Z with a blank: address@hidden octave]$ od -c b 0000000 # t h i s i s s o m e c .... <deleted> ... 0000140 s h e r e \n 4 8 \n 5 1 0 \n 0000160 \n 0000162 It works just fine: octave:1> load b octave:2> b b = 1 2 2 4 3 6 4 8 5 10 Regards, Dmitri. ------------------------------------------------------------- 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 -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |