bin-to-float.r is my first non-trivial script that I needed myself.
(It relies on 'ieee.r', which is also in this library.)
Basically, I use it like so:
d: read/binary %filename.dat
f: bin-to-float d
; Process series of floats...
write/binary float-to-bin f %newfile.dat
Please feel free to comment on it, as I'm not sure if my algorithm is the most efficient way to handle the binary! and series! types.
While I'm here, does anyone know of a function that takes a series
and a block as inputs, then outputs a new series based on the mapping
function that is provided in the block?
For example, let's say that my binary floats represent RGB data and
I need to unscramble the data into the correct order. Then, I suppose
the next step is converting that to an image! type. Hmm... I think
I still have a fair learning curve ahead of me.
2 sunanda 8-Nov-2006 20:53
I think you are asking for an equivalent of LISP's map function.
There isn't one in the Script Library, but several have been contributed / demonstrated on the Mailing List.
I am grateful for your wonderful content that you have provided for us. I am confident that the vast majority of the general public would find this useful.