Using a sparse matrix for ill-conditioned matrix

4 views (last 30 days)
I am using Newton method to solve a system of equations (n = 28) with 28 variables. After calculating the Jacobian, I need to get the inverse of the Jacobian and multiply that by the values of the equations at the given point. Yet, the Jacobian matrix had a condition number of the order 1e27. I scaled my variables and brought the cond(Jacobian) down to the order 1e10. One suggestion was to use a sparse matrix to cure the illness of the matrix. How can I proceed? The sparse matrix of the jacobian is:
1.0e+03 *
(1,1) 0.0000
(10,1) -0.0010
(17,1) -0.0000
(18,1) 0.0000
(19,1) 0.0000
(20,1) 0.0000
(21,1) -0.0000
(22,1) -0.0000
(2,2) 0.0000
(10,2) -0.0010
(16,2) 0.0062
(17,2) 0.0000
(18,2) -0.0004
(19,2) 0.0004
(20,2) 0.0000
(21,2) 0.0000
(22,2) -0.0000
(3,3) 0.0000
(10,3) -0.0010
(17,3) 0.0000
(18,3) 0.0015
(19,3) -0.0132
(20,3) -0.0000
(21,3) 0.0001
(22,3) 0.0004
(4,4) 0.0000
(10,4) -0.0010
(17,4) 0.0000
(18,4) 0.0000
(19,4) -0.0000
(20,4) -0.0003
(21,4) 0.0000
(22,4) 0.0000
(1,5) 0.0001
(9,5) -0.0010
(23,5) -0.0550
(24,5) -0.0012
(25,5) -0.0013
(26,5) -0.0004
(27,5) -2.3518
(28,5) -0.0008
(2,6) 0.0001
(9,6) -0.0010
(23,6) -0.0020
(24,6) -0.0093
(25,6) -0.0005
(26,6) -0.0011
(27,6) -5.6662
(28,6) -0.0008
(3,7) 0.0001
(9,7) -0.0010
(23,7) -0.0025
(24,7) -0.0005
(25,7) -0.0061
(26,7) -0.0014
(27,7) -8.0701
(28,7) -0.0012
(4,8) 0.0001
(9,8) -0.0010
(23,8) 0.0004
(24,8) 0.0006
(25,8) 0.0007
(26,8) 0.0002
(27,8) 1.1535
(28,8) 0.0002
(5,9) -0.0010
(17,9) 0.0010
(6,10) -0.0010
(18,10) 0.0010
(7,11) -0.0010
(19,11) 0.0010
(8,12) -0.0010
(20,12) 0.0010
(5,13) 0.0010
(23,13) 0.0010
(6,14) 0.0010
(24,14) 0.0010
(7,15) 0.0010
(25,15) 0.0010
(8,16) 0.0010
(26,16) 0.0010
(14,17) 0.0010
(13,18) 0.0010
(13,19) -0.0010
(14,19) -0.0010
(17,19) 0.0000
(18,19) 0.0000
(19,19) -0.0000
(20,19) 0.0000
(21,19) -0.0000
(22,19) -0.0000
(23,19) -0.0000
(24,19) -0.0000
(25,19) -0.0000
(26,19) -0.0000
(27,19) -0.0021
(28,19) -0.0000
(1,20) 0.0009
(2,20) 0.0000
(3,20) 0.0000
(4,20) 0.0001
(15,20) 0.0000
(16,20) 0.0076
(1,21) 0.0000
(2,21) 0.0000
(3,21) 0.0001
(4,21) 0.0009
(15,21) -0.0004
(17,22) -0.0000
(18,22) -0.0000
(19,22) -0.0000
(20,22) -0.0000
(21,22) -0.0000
(22,22) 0.0000
(23,23) -0.0000
(24,23) -0.0000
(25,23) -0.0000
(26,23) -0.0000
(27,23) -0.0001
(28,23) -0.0000
(11,24) 0.0010
(21,24) 0.0010
(12,25) 0.0010
(27,25) 0.0010
(15,26) 0.0000
(22,26) 0.0010
(15,27) 0.0001
(28,27) 0.0010
(16,28) 0.0010
while the f(x) matrix which is multiplied by the inverse of the Jacobian is as follow:
-0.0020
-0.0013
-0.0033
-0.0050
0.0096
-0.0361
0.0656
-0.0004
0.0001
-0.0000
0.0000
0.0000
0
0
0.0022
0.0230
-0.0096
0.0361
-0.0656
0.0004
-0.1136
-0.0000
0.0097
-0.0357
0.0658
-0.0003
0.3358
0.0001

Answers (0)

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!