wrong calculation of inverse matrix

조회 수: 2 (최근 30일)
bencsl
bencsl 2019년 4월 7일
댓글: Torsten 2019년 4월 8일
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?
螢幕快照 2019-04-08 上午2.12.14.png
  댓글 수: 4
David Goodmanson
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
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개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by