help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fread and ubit1


From: drumaliens
Subject: fread and ubit1
Date: Tue, 14 Sep 2010 14:56:32 -0700 (PDT)

In MATLAB I can read in just 1 bit from a binary file using bit1. In octave I
can't.

The only way I can think of get round this is to read in an int8, say, see
if it is greater than 127 which will give a 1 for the MSB and then make use
of fseek to move back by 7 bits. (Must admit haven't tried this)

Is there any more elegent way of doing this ?

Thanks

Paul
-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/fread-and-ubit1-tp2539699p2539699.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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