wrong calculation of inverse matrix
이전 댓글 표시
i have got a matrix
a=[ 8.371925000000001 -2.352900000000000 -4.033370000000001 1.019405000000000 -0.588200000000000;
-2.352900000000000 4.876890000000000 0 -0.588200000000000 1.044959999999999;
-4.033337000000000 0 4.033337000000000 0.000000000000000 0;
-1.064795000000001 0.588200000000000 0 8.113875000000000 8.113875000000000;
0.588200000000000 -1.093040000000000 0 -2.352900000000000 -2.352900000000000]
inv(a)
which give out
0.355615858390428 0.350051331178662 0.355618767972078 0.250754989305270 0.931280985155553
0.107719602768672 0.106034051782392 0.107720484110075 -0.238400306760741 -0.801950621197803
0.355615858390428 0.350051331178662 0.603552426875364 0.250754989305270 0.931280985155553
-0.165804799871048 -0.775520233961580 -0.165806156454541 -0.962196522948301 -3.621064878674608
0.204663830554452 0.813771214895349 0.204665505075180 1.135631499365114 3.801414057331816
and the ans is wrong, did i get any thing wrong?

댓글 수: 4
Adri
2019년 4월 7일
Check a*(inv(a)). It should give you the identity matrix.
madhan ravi
2019년 4월 7일
sym(a)*inv(sym(a)) % try this
David Goodmanson
2019년 4월 7일
Hi bencsl,
for what reason are you thinking that the answer is wrong? I tried b = inv(a) and got your Matlab result. Then checking a*b vs the identity matrix,
max(max(abs(b*a-eye(5))))
ans = 3.5527e-15 % should be small
so if any inverse is incorrect, it's the one in the image.
Torsten
2019년 4월 8일
Maybe you have to consider more digits for the entries in matrix a to get the result in the image.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!