Backslash with triangular matrices
이전 댓글 표시
I'm using a LU decomposition on a matrix A (square, sparse, complex, symmetric (not Hermitian)):
[M1,M2,P,Q,R] = lu(A);
I then apply the backslash operator to these resulting matrices to build a Schur complement:
T = Q*(M2\(M1\(P*(R\B))));
If B were a vector, this second line executes sufficiently fast. But when B is a square matrix, which it is in my case, this operation is very slow since Matlab internally loops through the columns of B (which is my conclusion after having done some tic/tocs). The second line of code runs on a single thread using Matlab 2013b on Win7 64bit which makes this even slower.
What is a good way of speeding this up? A parfor loop working on the columns of B didn't work for me in Matlab 2013b due to reasons discussed in http://www.mathworks.com.au/matlabcentral/answers/59250-error-with-parfor-and-big-matrices (despite Edric Ellis saying it had been fixed in 2013a). Anything else I can try?
Thanks!
댓글 수: 2
Edric Ellis
2013년 12월 13일
Can you post reproduction steps that make this fail using PARFOR?
Herwig
2013년 12월 17일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Triangular Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!