lsolve.m

来自「Hansen最新(2008)修订后的关于反演正则化方法的电子书与相应Matlab」· M 代码 · 共 31 行

M
31
字号
function x = lsolve(L,y,W,T)%LSOLVE Utility routine for "preconditioned" iterative methods.%% x = lsolve(L,y,W,T)%% Computes the vector%    x = L_p*y% where L_p is the A-weighted generalized inverse of L.%% Here, L is a p-by-n matrix, W holds a basis for the null space of L,% and T is a utility matrix which should be computed by routine pinit.%% Alternatively, L is square, and W and T are not needed.%% Notice that x and y may be matrices, in which case%    x(:,i) = L_p*y(:,i) .% Reference: P. C. Hansen, "Rank-Deficient and Discrete Ill-Posed Problems.% Numerical Aspects of Linear Inversion", SIAM, Philadelphia, 1997.% Per Christian Hansen, IMM, 07/29/97.% Initialization.[p,n] = size(L); nu = n-p; ly = size(y,2);% Special treatment of square L.if (nu==0), x = L\y; return; end% The general case.x = L(:,1:p)\y;x = [x;zeros(nu,ly)] - W*(T(:,1:p)*x);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?