[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How can I declare an "uint8 RowVector"?
From: |
John W. Eaton |
Subject: |
How can I declare an "uint8 RowVector"? |
Date: |
Mon, 16 Jan 2006 09:19:59 -0500 |
On 16-Jan-2006, Roberto Vidmar wrote:
| I need to read and process a binary file made of 553 byte records.
| Every record contains many data and, among these, 3 arrays of uint8 values.
| First I wrote an octave function to store every record in an octave
| structure using fread and uint8 convertion funcion:
|
| ...
| RpfRecord.ret2 = uint8(fread(rpfid, 220, 'uint8'));
| ...
|
| ...but this is far to slow for my purpouses so I tried to move the
What version of Octave are you using? With newer versions, including
2.1.72, you can write
RpfRecord.ret2 = fread(rpfid, 220, 'uint8=>uint8');
to read the data as uint8 and produces a uint8 array. I think this
should be about as fast as you could do with your own C++ code.
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
-------------------------------------------------------------