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

Jay Sullivan lon-capa-users@mail.lon-capa.org
Tue, 20 Nov 2007 10:14:21 -0500


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