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

📄 qls.m

📁 关于稀疏最小二乘算法的matlab程序
💻 M
字号:
function x = qls(A,b)%SSNE	Solution of sparse linear least squares problems.%       @(#)qls.m Version 1.6 6/23/93%       Pontus Matstoms, Linkoping University.%       e-mail: pomat@math.liu.se%%       x=qls(A,b) solves the sparse linear least squares problem%                    min ||Ax-b||%                     x          2%       using QR factorization and application of Q to the right-hand %       side b.[m,n]=size(A);% Minimum-degree ordering of A.q=colmmd(A);A=A(:,q);[v,d]=version;% Check for MATLAB V5.if str2num(v(1))<5,  [R,p,c]=sqr(A,b);% Resulting column permutation.  Pc=q(p);else  [c,R]=qr(A,b,0);  Pc=q;end% Compute the least squares solution.x=R\c;% Permute the computed solutionx(Pc)=x;

⌨️ 快捷键说明

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