The standard implementation of ldl factorization in Matlab does not work correctly
6 views (last 30 days)
Show older comments
The ldl(P) applied to symmetric matrix P should return a lover-triangular matrix L and a diagonal matrix D, such that:
The attached file contain the 9x9 symmetric matrix P, which ldl doesn't works with correctly:
load('ldl_fail.mat');
P % original symmetric matrix
max(max(P-P'))
[L,D] = ldl(P);
L % incorrect lover-triangular matrix factor
diag(D)'
L_ = chol(P)'; D_ = diag(L_).^2; L_ = tril(L,-1)+eye(size(L));
L_ % correct lover-triangular matrix factor (obtained with chol() function)
D_'
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Linear Algebra 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!