how to calculate the accurate inversion value of a matrix whose row decimal are very similar to each

13 次查看(过去 30 天)
a=[-0.996194973121394 -4.18489862633171e-06 -0.0871525989867842;
-0.996194973121394 -4.18489862656107e-06 -0.0871525989867874;
-0.990861867854174 0.00130908827787537 -0.134874182556999]
how to deal with the decimal because they are very similar to each other. When I use inv(a), I received "Warning: Matrix is singular to working precision."

采纳的回答

John D'Errico
John D'Errico 2016-1-11
ainv = vpa(inv(sym(a)))
ainv =
[ -7540941350696.4487450060870636637, 7540941350694.1381305123864180088, 1.3138284817290078738358358036888]
[ 3157313033178010.677259825837809, -3157313033178219.5964603322265217, 210.04366409187004090791933243926]
[ 86044878963710.126930820576625826, -86044878963695.179621569147733205, -15.027759994651251373171163937234]
Back to linear algebra 101 for you. The fact is, despite this being an "accurate" inverse, it is numerically useless. For example, is it a true inverse?
a*double(ainv)
ans =
1.001 -0.00097656 0
0.00097656 0.99902 0
0 0 1
Close, but not really so. Just the conversion of ainv to double precision numbers was enough to kill the utility of ainv as an inverse.
For some purposes, you can use pinv.
pinv(a)
ans =
-1.4041 -1.4041 1.8141
-0.2844 -0.2844 0.56945
10.313 10.313 -20.736
However, this is not in fact an inverse, as you can see here:
a*pinv(a)
ans =
0.5 0.5 -3.4417e-14
0.5 0.5 3.1974e-14
-3.3085e-14 3.2641e-14 1
Just wanting to compute the inverse of a numerically singular matrix is not sufficient. You need to either get a better matrix, or learn enough about linear algebra to know what limited set of things you can do with that matrix.

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by