[Top][All Lists]

[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.


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]