关于chol分解的置换向量的问题及正定对称稀疏矩阵的构造

 

L为上三角

 

 L为下三角

 

 Matlab验证

A = gallery('wathen',10,10);
B = rand(size(A,1),size(A,2));
X_true = A\B;

[L,flag,p] = chol(A,'vector');
X_test(p,:) = L\(L'\B(p,:));
max(max(abs((X_true-X_test)./X_true )))

A = gallery('wathen',10,10);
B = rand(size(A,1),size(A,2));
X_true = A\B;

[L,flag,pp] = chol(A,'lower','vector');
X_test(pp,:) = L'\(L\B(pp,:));
max(max(abs((X_true-X_test)./X_true )))

 

附录:正定对称稀疏矩阵

A = gallery('wathen',10,10);

 

 
posted @ 2021-04-08 19:24  xdd1997  阅读(158)  评论(0编辑  收藏  举报