From owner-help-octave at bevo dot che dot wisc dot edu Sat Aug 10 05:31:07 1996 Subject: Re: bit operations -- are they possible? From: Ted dot Harding at nessie dot mcc dot ac dot uk (Ted Harding) To: berntn at sto dot foa dot se Cc: help-octave at bevo dot che dot wisc dot edu Date: Sat, 10 Aug 1996 11:15:55 +0100 (GMT+0100) ( Re Message From: Bernt Nilsson ) > > I have an older FORTRAN program for demultiplexing sampled data files. > In these multiplexed files, consisting of 16 bit words, each word > contains a 12 bit value and a 4 bit channel number. > > The problem with the FORTRAN program is that it cannot handle files > larger than 32 MB. therefore I would like to let Octave handle the > demultiplexing instead. > > Is it possible to use Octave for "sifting" out the value and the > channel number respectively, or do I have to use C/FORTRAN for this? > That is, is it possible to rewrite my old program as an Octave m-file? > > Since I wrote this message I have found out that I could use the > string routines bin2dec and dec2bin. The question is then, would an > m-file using these routines be painfully slow? Is there anyone with > experience in doing these operations? Whether or not it is possible, let alone reasonably fast (which it probably wouldn't be), under octave, I would go for C in this case. A C program to do this job would be very short, and very fast, and would not have a problem with file size. Ted. (Ted dot Harding at nessie dot mcc dot ac dot uk)