Subversion Repositories wimsdev

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2071 zjchen 1
!goto $wims_read_parm
2
 
3
:def
4
title=Solve linear system
5
synonyme=linear solve, system solve, solve system
6
input=equations
7
!exit
8
 
9
:proc
10
 
11
fml=!lines2items $formula
12
fml=!replace , by , $ in $fml
13
eqcnt=!itemcnt $fml
14
fml=!rawmath $fml
15
vars=!varlist $fml
16
 
17
result=!exec maxima print(linsolve([$fml],[$vars]));
18
 
19
result=!declosing $result
20
result=!replace , by , $ in $result
21
result=!trim $result
22
!if $result=$empty
23
 error=solve_fail
24
!endif
25
 
26
!exit
27
 
28
:output
29
Solution(s) of
30
!if $eqcnt>1
31
 {
32
 !htmlmath $fml
33
 }
34
!else
35
 !htmlmath $fml
36
!endif
37
 :
38
<p><center>
39
!insmath $result
40
</center> <p>
41
!if r1 isvarof $result
42
 Where r<sub>1</sub>, r<sub>2</sub>, ... are arbitrary parameters.
43
!endif
44
 
45
!exit
46