[LON-CAPA-users] looking for linear algebra library
Peter Riegler
lon-capa-users@mail.lon-capa.org
Tue, 20 Nov 2007 16:23:18 +0100
Here ist what maxima does:
(%i34) invert(matrix([10,-4],[1,0.5]))
;
(%o34) matrix([0.055555555555556,0.44444444444444],
[-0.11111111111111,1.111111111111111])
(%i35) invert(matrix([10,-4],[1,1/2]));
(%o35) matrix([1/18,4/9],[-1/9,10/9])
(%i36)
I have the uneasy feeling that we might have a bug here in lonmaxima
(the part of loncapa which provides the interface to maxima). I faintly
remember to have fixed something similar. I have to check.
Thanks for pointing out.
Jay Sullivan wrote:
> Okay, maybe I spoke to soon. Is there a character limit on the output of &cas?
>
> When I try the following, the output seems truncated:
>
> <script type="loncapa/perl">
> $s= 'maxima';
> $str = &cas($s,'invert(matrix([10,-4],[1,0.5]))');
> </script>
> $str
>
> The output on the screen is:
> matrix([0.05555555555556,0.44444444444444],
>
>
> If instead I do:
> <script type="loncapa/perl">
> $s= 'maxima';
> $str = &cas($s,'invert(matrix([10,-4],[1,1/2]))'); # **** note the
> only change is using 1/2 instead of 0.5
> </script>
> $str
>
> The output is:
> matrix([1/18,4/9],[-1/9,10/9])
>
> How can I get it to work in the first example?
>
> 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