How to find inverse of a 608*608 matrix fast?

4 ビュー (過去 30 日間)
raina RAJ
raina RAJ 2020 年 7 月 1 日
コメント済み: Christine Tobler 2020 年 7 月 2 日
I am trying to find the inverse of Q00{5} in the attached c=2_g=1_l=5.mat file. I have tried inv() function as well as backslash function. But this inverse is taking so much time like 20-30 minutes. Is there any faster method to calculate the inverse of this size matrix?

採用された回答

Christine Tobler
Christine Tobler 2020 年 7 月 1 日
The matrices in this file are symbolic, it's very expensive to compute with large arrays of these variables. If you cast it to floating-point numbers, this will be much faster to compute with
>> A = double(Q00{5});
>> tic; inv(A); toc
Elapsed time is 0.009040 seconds.
  2 件のコメント
raina RAJ
raina RAJ 2020 年 7 月 2 日
Thanks this is working. But converting the matrices into double also taking too much time. To aviod this should I convert the entries into double from starting itself (at the time of matrix construction) or is there any other solution avavilable for this?
Christine Tobler
Christine Tobler 2020 年 7 月 2 日
It depends why you originally constructed them as symbolic numbers. If you don't need symbolic computation at all, it will be more efficient to construct in double directly.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by