[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Efficient I/O for 24-bit integer?
From: |
Johan Kullstam |
Subject: |
Re: Efficient I/O for 24-bit integer? |
Date: |
15 Jun 2005 07:20:06 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
address@hidden writes:
> Hello,
> perhaps someone on the list has a good idea for this. I am in need
> for an efficient method to read and write large arrays of 24-bit
> signed integer values to and from binary files.
Two options:
1) Write C++ .oct files to read and write the array(s).
2) Make a pair of translator programs which convert the 24-bit array
to something more amenable to octave such as double-float or 32-bit
integer. I would choose the double format since that's what octave
will convert the others into anyway. (You can squeeze it into a
single-float since the 23 bit mantissa carries an implied 1 at the
front.) The translator could be written in C, C++, fortran, &c.
Given a working C/C++ compiler and mkoctfile, option 1) is actually
not too hard.
--
Johan KULLSTAM
-------------------------------------------------------------
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
-------------------------------------------------------------