Underlying Implementation of LDL in Matlab

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by