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 Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by