Solving linear equations with large times

2 ビュー (過去 30 日間)
剑豪 戴
剑豪 戴 2022 年 2 月 18 日
コメント済み: 剑豪 戴 2022 年 2 月 20 日
I am new to using matlab. I have a simple linear equation of Ax=B in loops;
where A is a complex matrix (1000x1000), and A will be changed with the parameters f, delta_p and delta_dopp in my code, i.e. A=A(f, delta_p, delta_dopp); B is a simple invariant column matrix (1000x1).
Cause I need to solve the linear equation almost about ~10^6 times. And matirx A is changing inside the loops (f, delta_p, delta_dopp are cycle indicators). When I using x=A\B solving the eqution, it should take me a lot of time. For example, it takes me one hour running 5e4 times.
I hope that someone can suggest a faster and better method? (Especially for the x=A\B method).
This is distribution of matrix A:
Thanks a lot!
  6 件のコメント
KSSV
KSSV 2022 年 2 月 18 日
剑豪 戴
剑豪 戴 2022 年 2 月 18 日
Thanks a lot!

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

採用された回答

Hiro Yoshino
Hiro Yoshino 2022 年 2 月 18 日
It seems that your matrix is sparse - it would be worth while using some techniques for sparse matrix operetions where you can find methods for linear problems.
  4 件のコメント
Hiro Yoshino
Hiro Yoshino 2022 年 2 月 20 日
put in one lines before A = C as follows:
A = zeros(size(C));
剑豪 戴
剑豪 戴 2022 年 2 月 20 日
Thanks!

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

その他の回答 (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