Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2071 | zjchen | 1 | !goto $wims_read_parm |
2 | |||
3 | :def |
||
4 | title=Characteristic polynomial |
||
5 | synonyme=charpoly |
||
6 | input=square_matrix |
||
7 | !exit |
||
8 | |||
9 | :proc |
||
10 | result=!exec pari charpoly([$mat]) |
||
11 | !exit |
||
12 | |||
13 | :output |
||
14 | !set pars=$[max(min($rows,10),1)] |
||
15 | <center> |
||
16 | <table border=0 cellpadding=2> |
||
17 | !for i=1 to $rows |
||
18 | !set l=!line $i of $formula |
||
19 | <tr> |
||
20 | !if $i=1 |
||
21 | <td nowrap rowspan=$rows>A = $(m_leftpar$pars) |
||
22 | !endif |
||
23 | !for j=1 to $cols |
||
24 | !set k=!item $j of $l |
||
25 | <td nowrap align=center>$k |
||
26 | !next j |
||
27 | !if $i=1 |
||
28 | <td nowrap rowspan=$rows>$(m_rightpar$pars) |
||
29 | !endif |
||
30 | !next i |
||
31 | |||
32 | </table></center> <p> |
||
33 | The characteristic polynomial of A is |
||
34 | !htmlmath $result |
||
35 | . |
||
36 | |||
37 | !exit |
||
38 |