Getting Complex Data into MathLive

Getting complex data into MathLive

It is straightforward to import data into Mathematica and hence to visualize the data in MathLive. There is an extensive chapter within the MathLive manual illustrating how data in a variety of formats may be loaded into MathLive. In essence there is no limit on the data which may be loaded into MathLive when employing well established techniques of loading data into Mathematica.

To give a flavour of what is possible, we illustrate how we might load binary information into Mathematica and hence into MathLive.

Reading Binary Files

Mathematica possesses facilities for both reading in and writing to binary files in the package Utilities`BinaryFiles`. You should consult the packages documentation for further information about how this works. It is loaded with the following command:


We can use a variant of the ReadList command, known as ReadListBinary, to pull binary data into Mathematica. As usual, we must specify the data types that we are reading in. Here is a simple example where we have a rather peculiar file consisting of triples of numbers. The first and third numbers in each triple are 2-byte (signed) integers, which fall into the Mathematica category Int16, whereas the middle number is an 8-byte real number that is categorized as a Mathematica Double:

pointdata = ReadListBinary["data.bin", {Int16, Double, Int16}]

Having coped with this rather bizarre data set, we can construct a scatter plot very easily. There are several ways of doing this. If you load the "Graphics3D" package, you can just use ScatterPlot3D. Alternatively, if you like using graphics primitives, why not try the following:

pts3d = Map[Point, pointdata];

and send the result to MathLive.
datasheet technical notebooks demos

about us contact new index
internet software virtual reality programming