how to Invert a matrix and how to delete a row and a column?
2 ビュー (過去 30 日間)
古いコメントを表示
1.4286 5.0000 Inf 5.0000 3.3333 Inf
5.0000 0.9524 4.0000 10.0000 3.3333 5.0000
Inf 4.0000 1.6393 Inf 3.8462 10.0000
5.0000 10.0000 Inf 1.4286 2.5000 Inf
3.3333 3.3333 3.8462 2.5000 0.6410 3.3333
Inf 5.0000 10.0000 Inf 3.3333 1.6667
I have this matrix but since it contains inf variable i cant invert the matrix....and i get this NaN .....(can i replace inf with zero?)
and how can i delete specific column and row?....
0 件のコメント
採用された回答
John D'Errico
2022 年 1 月 9 日
You would need to delete almost every row and column. What does it mean to invert a matrix of arbittraily small size then?
And replacing inf with zero is totally inconsistent with what that element was originally, so just repacing infs with zero and still computing an inverse seems wrong. An inf is a immensely large number, as opposed to a really tiny number.
Can you replace an inf with zero? Well, trivially, yes. Read the help for isinf to learn how to locate inf elements.
help isinf
Can you delete a row or column of a matrix again, trivially easy. (Should you be reading one of the many MATLAB turorials to be found? Reading the manual is a good thing. Even real men do it.)
A = magic(3)
A(2,:) = []
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!