[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inline::Octave for perl

From: adler
Subject: Re: Inline::Octave for perl
Date: Mon, 22 Oct 2001 21:49:20 -0400 (EDT)

On Mon, 22 Oct 2001, Paul Kienzle wrote:
> I'm no perl hack, but I gave it a try anyway.  It would be nice if you could
> upload
> a demo script to go with it so that non-perl folks can see if it works.  I put
>     #!/usr/bin/perl
> at the top of your example below and got the following result:

Sorry, I realized I should have given some directions ...

You need to install the Inline module from CPAN. This provides
the infrastructure to support all the Inline::* modules.

Then install in an Inline directory in any path in your @INC.

An:~> perl -e 'print join ",\n",@INC '     # my values

The easiest is to create a ./Inline directory in your
working directory, and put in that.

after that the example code should run.

It should work with stock octave - but I'd like to get feedback on this.
Basically, I create an octave process with controlled stdin and stdout.
Commands send by stdin. Data is send by stdin and read with
fread(stdin, [dimx dimy], "double"), and read similarly.

Inline::Octave::Matrix variables in perl are tied to the octave
variable. When a destructor is called, it sends a "clear varname"
command to octave.

I initially tried to bind the C++ and liboctave to perl, but
it started to get really hard - so I took this route.

Andy Adler,                address@hidden

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]