Smaller matrix causes mldivide to fail (out of memory)

2 views (last 30 days)
Hi,
I want to execute the following code which always worked till now. I tried 2 differents cases where one matrix is smaller than the other. The first case, with the smaller matrix, fails with an out of memory error, while the second case execute successfully!
1. m = 307785 (nnz(W) = 8290840, numel(W) = 94731606225) -> FAIL
2. m = 1064960 (nnz(W) = 28163332, numel(W) = 1134139801600) -> OK
W = sparse(Y,X,V,m,m);
D = spdiags(sum(W, 2),0,m,m);
P = D\W;
Any idea why this is happening? Thank you!

Answers (0)

Categories

Find more on Operating on Diagonal Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!