[LON-CAPA-users] looking for linear algebra library

Jay Sullivan lon-capa-users@mail.lon-capa.org
Tue, 20 Nov 2007 06:57:56 -0500


Thanks for the pointer. I think I will like using the maxima
interface. However, I'm stuck trying to figure out how to pass a
matrix from maxima into a perl variable.

Based on the example below, from the output, it looks like maxima
received the correct matrix input and evaluated the inverse matrix
correctly. How could I assign the output of the &cas routine to a
multidimensional perl array? Any tips? Thanks.

code:
<problem>
<script type="loncapa/perl">
$s= 'maxima';
@B = ();
$str = &cas($s,'invert(matrix([10,0,0],[0,3,0],[0,0,1]))');
$str=~s/matrix//;
@B = $str;
$tmp = $B[0][0];
</script>
$str<br/>
$tmp
</problem>

output:
([1/10,0,0],[0,1/3,0],[0,0,1])
$tmp

JS

On Nov 18, 2007 4:53 PM, Peter Riegler <p.riegler@fh-wolfenbuettel.de> wrote:
> Hi,
>
> loncapa provides access to maxima, a free computer algebra system.
> Maxima comes with all the functionalities you need here.
> You might want to have a look at the ressources at
> /res/fhwf/username/Mathematik/LineareAlgebra
> or
> /res/nds/username/Mathematik/LineareAlgebra
>
> Most of them are in German, but the source code should be available.
>
> Peter
>
>
> Jay Sullivan wrote:
>
> > Does anyone have a linear algebra perl library they would mind sharing?
> >
> > I'm looking for basic matrix functionality: matrix add, subtract,
> > multiply, determinant, inverse
> >
> > Thanks,
> > Jay
> > _______________________________________________
> > LON-CAPA-users mailing list
> > LON-CAPA-users@mail.lon-capa.org
> > http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
>
> --
> Peter Riegler
> Fachhochschule Braunschweig/Wolfenbüttel
> Salzdahlumer Str. 46/48, 38302 Wolfenbüttel
> Tel. +49 5331 939 6314, Fax. +49 5331 939 6002
> email: p.riegler@fh-wolfenbuettel.de
> http://public.rz.fh-wolfenbuettel.de/~riegler
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
>