views:

165

answers:

1

First, I've tried the stuff you get using "load(functs)", no thank you.

I have some pretty complex equations that I'd like to evaluate in Maxima. But at one step in the process I split a register in it's most-significant and least-significant components, and I need to be able to do that in Maxima -- if I am to evaluate the class of test functions I have in mind.

A: 

Daniel,

Using the numericalio package, Maxima is able to read binary data in from streams and files, along 8-bit boundaries, and to set the desired byte order for the read in. numericalio comes with the pre-compiled Windows version.

So assuming you're dealing with at least 16-bit registers, and you want to split the registers on 8-bit boundaries, then the function

read_binary_array (S, A), 

may be what you're looking for, where S is the source of the data, and A is an array (destination).

There are also variants and supporting functions that you can consider / may need:

read_binary_list()
openr_binary()   /* for reading in from a file */

assume_external_byte_order()  /* default action is msb first */

That's the most direction option.

There's not much additional data in your question, so here are two other avenues to consider.

If you need more "pre-processing" facility than Maxima has available with numericalio, you might consider setting up a short pipeline doing the pre-processing in some other language that is quick and has the low-level flexibility (Ruby is good for this, as are other scripting languages), and then read the cleaned up file into Maxima using the package described bove.

Finally, these more atypical attempts usually hit some sort of a wall before all the kinks get worked out.

When that happens, I recommend using the Maxima mailing list. I've found it to be a very a responsive, expert community that can not only help you out of a jam, but that also raises the level of your proficiency and your familiarity with "natural" Maxima programming style. It's been of great help in some of the work I've done.

(For additional resources on Maxima, including a Ready Reference Cheat Sheet, see Resources: Maxima for Symbolic Computation)

Cheers,

AKE