
Q-Octave - Octave interface for the Q programming language
======== = ====== ========= === === = =========== ========

For this module to work, you must have GNU Octave on your system. You can get
the latest Octave release at http://www.octave.org. Q-Octave should work fine
with both the stable and the development releases of Octave.

Octave is a comprehensive MATLAB-like software for performing advanced numeric
computations. This package provides an interface to the Octave interpreter,
which enables you to execute Octave commands and exchange variable values
between Q and Octave.

The "stub" script is in octave.q, octave.c contains the actual C code for the
module. A description of the available functions can be found in octave.q.

Usage is fairly straightforward. You can submit a command to Octave as follows
(invoking the octave function starts up an Octave interpreter automatically if
it is not already running):

	==> octave "A=[1,2;3,4]; eig(A)"
	()

	==> ans =

	   5.37228
	  -0.37228

The command is executed asynchronously in the Octave interpreter, and any
results printed by octave will be echoed to stdout. You can also set and
get octave variables:

	==> octave_set "A" [[1,2],[3,4]] || octave "eig(A);" || \
	octave_get "ans"
	[[5.37228132326901],[-0.372281323269014]]

Supported Octave value types are scalars (real and complex), vectors and
matrices, which will be mapped to the corresponding Q entities (as the above
example indicates, lists are used to represent vectors and matrices). Strings
and structures are not supported at this time, but may be added in a future
release.

To terminate the inferior octave process, you can use the octave_quit
function; another invokation of the octave function afterwards starts a new
interpreter. Thus

	==> octave_quit || octave ""

is a way to restart the interpreter. This can be handy if things get messed
up.

Enjoy! :)

Sep 8 2000
Albert Graef
ag@muwiinfa.geschichte.uni-mainz.de, Dr.Graef@t-online.de
http://www.musikwissenschaft.uni-mainz.de/~ag
