用 Gauss-Jordan 法求解 Ax = b,並列出 A-1,其中

A =

1 2 3 4
5 8 9 1
2 4 0 7
4 3 2 1

b =

1
0
0
1

A 與 b 需要先打成檔案 a.dat 與 b.dat 再由程式讀入。

 

 

參考答案: