[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Inline::Octave for perl

**From**: |
adler |

**Subject**: |
Inline::Octave for perl |

**Date**: |
Sun, 21 Oct 2001 23:10:00 -0400 (EDT) |

Hi all,
I'm in the process of writing an Inline::Octave
module for perl. I've got a sample version
at octave.sf.net.
http://cvs.sf.net/cgi-bin/viewcvs.cgi/octave/octave-forge/extra/perl/
It's preliminary, but it does work. (With no
real error checking)
I'm looking for suggestions as to what sort of
features would be worth adding to this kind
of module. And what the syntax should be
like.
Also, if someone could try this on a big-endian
machine - I can't test whether I got the encoding
right.
Currently, code looks like this:
use Inline Octave;
$f = jnk1(3);
print "jnk1=",$f->disp(),"\n";
$c= new Inline::Octave::Matrix([ [1.5,2,3],[4.5,1,-1] ]);
($b, $t)= jnk2( $c, [4,4],[5,6] );
print "t=",$t->as_list(),"\n";
use Data::Dumper; print Dumper( $b->as_matrix() );
print oct_sum( [1,2,3] )->disp();
oct_plot( [0..4], [3,2,1,2,3] );
sleep(2);
__DATA__
__Octave__
function x=jnk1(u); x=u+1; endfunction
function [b,t]=jnk2(x,a,b);
b=x+1+a'*b;
t=6;
endfunction
## Inline::Octave::oct_sum (nargout=1) => sum
## Inline::Octave::oct_plot (nargout=0) => plot
_______________________________________
Andy Adler, address@hidden
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------

**Inline::Octave for perl**,
*adler* **<=**