File: inverse.pcm

package info (click to toggle)
extrema 4.3.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,212 kB
  • ctags: 6,452
  • sloc: cpp: 86,428; sh: 8,229; makefile: 814
file content (22 lines) | stat: -rw-r--r-- 323 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
m=[[3;10;5];[4;2;-4];[15;3;3]]
b=[26;14;22]
soln=gaussj(m,b)
='solve mx=b for x, where m ='
=m
='and b ='
=b
=' '
='solution = '
=soln
=' '
='check by looking at m<>solution ='
=m<>soln
=' '
='now for the matrix inverse...'
inv=inverse(m)
=' '
='inverse ='
=inv
=' '
='check by looking at m<>inverse ='
=abs(m<>inv-1)<.001