Underlying Implementation of LDL in Matlab

1 回表示 (過去 30 日間)
Nathan Zhao
Nathan Zhao 2022 年 1 月 5 日
コメント済み: Nathan Zhao 2022 年 1 月 5 日
The general question is: how is the ldl implemented in Matlab?
Motivation: I want to confirm the ldl implementation is not using the same algorithm as the lu() function (which I'm aware uses umfpack). The reason I am asking is that when I compare the speed of the ldl and lu on the same sparse laplacian matrix, the ldl comes out a lot slower than doing [L,U,P,Q] = lu(A), even though we expect the ldl to be, at best, up to 50% faster. My hunch here is that the ldl is not using the same multifrontal solver as umfpack is:
Code snippet for reference:
A = (delsq(numgrid('L', 400)));
%A2 = full(delsq(numgrid('L', 40)));
bA = sum(A,2);
tic
[LA, DA, PA, SA] = ldl(A);
toc
x = SA*(PA'\(LA'\(DA\(LA\(PA\(SA*bA))))));
tic
[L,U,P,Q] = lu(A);
toc
xl = P\(U\(L\(Q\bA)));
figure(); plot(x);
hold on;
plot(xl)

回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by