solving linear system with highly sparse matrices

Hi I want to solve a linear system Ax=b, with A and b very sparse and big. Right now my code is in the testing so the matrices are of the order of only a few hundreds, but eventually it's going to be bigger. for example, for the system of order 172 with the condition number 3.7987e+03 I tried pcg in matlab, but I am getting this error:
"pcg stopped at iteration 3 without converging to the desired tolerance 1e-06 because a scalar quantity became too small or too large to continue computing. The iterate returned (number 0) has relative residual 1 "
What other method I can try.. I dont want to rely on linsolve or "/" since I dont think these methods can be trusted for the bigger matrices. Please correct me if I am wrong. Thanks

 採用された回答

Andrew Newell
Andrew Newell 2011 年 6 月 19 日

0 投票

In this previous post, a backslash is easily able to deal with a system of order 300,000. The key is defining your sparse matrix efficiently.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by