[Maxima] access results of linsolve

andre maute andre.maute at gmx.de
Tue Dec 15 17:37:05 CST 2009


Hi Barton,

could you explain the details of the difference?
I can't reproduce your output, see below

>  (%i5) ssol : linsolve([C1*3-2,C2*1+4],[C1,C2]);
>  (%o5) [C1=2/3,C2=-4]
>
> Not what we want:
>
>  (%i6) ssol[1];
>  (%o6) ssol[1]
>
> OK
>
>  (%i7) inpart(ssol,1);
>  (%o7) C1=2/3



========================================================
user at home:~$ maxima -b linsolve1.max 
Maxima 5.19.1 http://maxima.sourceforge.net
Using Lisp SBCL 1.0.18.debian
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1)                        batch(linsolve1.max)



batching /home/user/linsolve1.max
(%i2)                          display2d : false
(%o2) false
(%i3) sol:linsolve([C1*3-2,4+C2*1],[C1,C2])
(%o3) [C1 = 2/3,C2 = -4]
(%i4) subst(sol,[C1,C2,C1-C2])
(%o4) [2/3,-4,14/3]
(%i5) ssol:linsolve([C1*3-2,4+C2*1],[C1,C2])
(%o5) [C1 = 2/3,C2 = -4]
(%i6) ssol[1]
(%o6) C1 = 2/3
(%i7) inpart(ssol,1)
(%o7) C1 = 2/3
(%o7) "/home/user/linsolve1.max"
========================================================



Andre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.math.utexas.edu/pipermail/maxima/attachments/20091216/41b16c97/attachment.htm 


More information about the Maxima mailing list