⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csne.m

📁 关于稀疏最小二乘算法的matlab程序
💻 M
字号:
function x = csne(A,b)%CSNE	Solution of sparse linear least squares problems.%       @(#)csne.m Version 1.4 6/23/93%       Pontus Matstoms, Linkoping University.%       e-mail: pomat@math.liu.se%%       x=csne(A,b) solves the sparse linear least squares problem%                    min ||Ax-b||%                     x          2%       using the semi-normal equation R'Rx=A'b. R is here%       the upper triangular matrix R in the QR factorization of A.%       The accuracy of the computed solution is improved by a few %       steps of iterative refinement.% Minimum-degree ordering of A.q=colmmd(A);A=A(:,q);% Compute the QR factorization of A.[R,p]=sqr(A);% Resulting column permutation.A=A(:,p);Pc=q(p);% Compute the SNE-solution.ATb=A'*b;y=R'\ATb;x=R\y;% One step of iterative refinement.r=b-A*x;ATb=A'*r;y=R'\ATb;dx=R\y;x=x+dx;% Permute the computed solution.x(Pc)=x;

⌨️ 快捷键说明

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