资源简介
压缩感知稀疏度自适应匹配追踪算法,不需稀疏度作为先验信息。又称为SAMP算法
代码片段和文件信息
function [ theta ] = CS_SAMP( yAS )
%CS_SAMP Summary of this function goes here
%Version: 1.0 written by jbb0523 @2015-05-08
% Detailed explanation goes here
% y = Phi * x
% x = Psi * theta
% y = Phi*Psi * theta
% 令 A = Phi*Psi 则y=A*theta
% 现在已知y和A,求theta
% Reference:Thong T.Do,Lu Gan,Nam Nguyen,Trac D.Tran.Sparsity adaptive
% matching pursuit algorithm for practical compressed sensing[C].Asilomar
% Conference on Signals,Systems,and Computers,Pacific Grove,California,
% 2008,10:581-587.
% Available at:
% http://dsp.rice.edu/sites/dsp.rice.edu/files/cs/asilomar08_final.pdf
[y_rowsy_columns] = size(y);
if y_rows y = y‘;%y should be a column vector
end
[MN] = size(A);%传感矩阵A为M*N矩阵
theta = zeros(N1);%用来存储恢复的theta(列向量)
Pos_theta = [];%用来迭代过程中存储A被选择的列序号
r_n = y;%初始化残差(residual)为y
L = S;%初始化步长(Size of the finalist in the first stage)
Stage = 1;%初始化Stage
IterMax = M;
for ii=1:IterMax%最多迭代M次
%(1)Preliminary Test
product = A‘*r_n;%传感矩阵A各列与残差的内积
[valpos]=sort(abs(product)‘descend‘);%降序排列
Sk = pos(1:L);%选出最大的L个
%(2)Make Candidate List
C
- 上一篇:Sobel边缘检测matlab实现
- 下一篇:matlab牛头刨床
评论
共有 条评论