MATLAB Crashes with Segmentation Fault when Solving BICG Function with Sparse Matrices

Hello everyone, basically this happens no matter what is the size of the sparse matrix. I crease sparse matrix using sparse(i,j,s) function in Matlab. Then, when I try to use bicg function with the created sparse matrices( https://www.mathworks.com/help/matlab/ref/bicg.html ), matlab crashes because it runs out of memory. I cannot use full matrices because the size of the 3d matrices are too much (100x100x100). How can I solve this problem?

1 件のコメント

A 100-by-100-by-100 full matrix isn't that big.
A = ones(100, 100, 100);
whos A
Name Size Bytes Class Attributes A 100x100x100 8000000 double
What does the following code show when called immediately before you try to create a sparse matrix that causes MATLAB to run out of memory?
rows = max(i)
cols = max(j)
My guess is that you have a much larger value in j than you think you do.

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

回答 (0 件)

カテゴリ

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

質問済み:

2021 年 10 月 27 日

コメント済み:

2021 年 10 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by