From help-octave-request at bevo dot che dot wisc dot edu Fri Feb 6 12:34:43 2004 Subject: Re: Tip for loading Excel Spreadsheet into Octave on Mac From: "Henry F. Mollet" To: "John W. Eaton" CC: Octave_post Date: Fri, 06 Feb 2004 10:27:39 -0800 This may go to far afield. BBEdit HexDump reads my "testoctave" file but it cannot get to the end the corresponding "test.sys" file. At least I cannot see the actual data. Perhaps they use a propriety binary format? (Systat is not even available anymore for Mac, I rarely use an old version which barely runs on OS 9 in classic mode). Henry octave:29> load testoctave octave:30> whos *** local user variables: prot type rows cols name ==== ==== ==== ==== ==== rwd matrix 2 1 X rwd matrix 2 1 Y octave:31> X X = 11 % is Hex 31 31 21 % is Hex 32 31 octave:32> Y Y = 12 % is Hex 31 32 22 % is Hex 32 32, Hex 0A = A is linefeed (decimal 10) Hexdump of this file ("testoctave") is: 0000: 23 20 43 72 65 61 74 65 64 20 62 79 20 4F 63 74 # Created by Oct 0010: 61 76 65 20 32 2E 31 2E 34 36 2C 20 46 72 69 20 ave 2.1.46, Fri 0020: 46 65 62 20 30 36 20 30 39 3A 35 32 3A 30 37 20 Feb 06 09:52:07 0030: 32 30 30 34 20 50 53 54 20 3C 6D 6F 6C 6C 65 74 2004 PST ¿ 0060: 23 20 6E 61 6D 65 3A 20 58 0A 23 20 74 79 70 65 # name: X¿# type 0070: 3A 20 6D 61 74 72 69 78 0A 23 20 72 6F 77 73 3A : matrix¿# rows: 0080: 20 32 0A 23 20 63 6F 6C 75 6D 6E 73 3A 20 31 0A 2¿# columns: 1¿ 0090: 20 31 31 0A 20 32 31 0A 23 20 6E 61 6D 65 3A 20 11¿ 21¿# name: 00A0: 59 0A 23 20 74 79 70 65 3A 20 6D 61 74 72 69 78 Y¿# type: matrix 00B0: 0A 23 20 72 6F 77 73 3A 20 32 0A 23 20 63 6F 6C ¿# rows: 2¿# col 00C0: 75 6D 6E 73 3A 20 31 0A 20 31 32 0A 20 32 32 0A umns: 1¿ 12¿ 22¿ Hexdump of "test.sys" is: 0000: 00 00 00 32 00 00 00 00 00 00 00 00 24 24 24 24 ¿¿¿2¿¿¿¿¿¿¿¿$$$$ 0010: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 $$$$$$$$$$$$$$$$ 0020: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 $$$$$$$$$$$$$$$$ 0030: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 $$$$$$$$$$$$$$$$ 0040: 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 $$$$$$$$$$$$$$$$ 0050: 24 24 24 24 00 00 00 02 00 00 00 01 00 00 00 02 $$$$¿¿¿¿¿¿¿¿¿¿¿¿ 0060: 20 20 20 20 20 20 20 58 20 20 20 20 20 20 20 20 X 0070: 20 20 20 59 20 20 20 20 40 26 00 00 00 00 00 00 Y at &¿¿¿¿¿¿ 0080: 40 28 00 00 00 00 00 00 40 35 00 00 00 00 00 00 at (¿¿¿¿¿¿@5¿¿¿¿¿¿ 0090: 40 36 00 00 00 00 00 00 at 6¿¿¿¿¿¿ on 2/5/04 8:12 PM, John W. Eaton at jwe at bevo dot che dot wisc dot edu wrote: > On 5-Feb-2004, Henry F. Mollet wrote: > > | 4. Possible future use of BBEdit because it allows opening of a file in > | Hexdump (see below for first block). I have binary Systat file which I'd > | like to convert directly into octave data files one day. I was hoping that > | if I could look inside of a Systat binary file and inside of an Octave > | binary file, I might be able to "doctor" the Systat binary file so that > | Octave would be able to load (open) it. > > Is the Systat data file format published somewhere? Then perhaps > writing something that could read the Systat file and translate it to > something useful would be the way to go. > > | However, you explained in a recent post why I cannot load binary files on my > | Mac, so there was no point even trying to doctor my Systat binary files: > | > | > 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). > > Presumably this bug will be fixed (I was under the impression that it > had, in a more recent version of the C or C++ libraries for OS X). > > 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 -------------------------------------------------------------