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

 采纳的回答

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