%Compressed Sensing / Compressive Sensing
clc;
clear;
close all;
warning off;
addpath(genpath(pwd));
rng('default');
%计数器
tic
l=8;
c=8;
S=5;
% m is the number of measurement
%m=20;
A=5:20;
D=zeros(size(A));
D2=D;
Dmod=D;
D1=D;
%Dp5=D;
Dmod3=D;
Dco=D;
%Monte Carlo
Dsp=D;
for t=1:200
rng(t);
for k=1:length(D)
m = A(k);
[t,k]
r2 = randperm(l*c);r2=r2(1:S);rr2=r2(:);
u_true = zeros(l*c,1); u_true(r2)=u_true(r2)+rand(S,1);
phi = (kron((fft(eye(c))).',fft(eye(l))));
r = randperm(l*c);r=r(1:m);
phi = phi(r,:);
b = phi * u_true(:);
[d1,u_new1] = IRLSregcomp(phi,b,1,u_true(:));
[uestOMP,d2] = OMP(phi,b,u_true,S);
[uestOMPmod3,dmod3] = OMPmod3(phi,b,u_true,S);
[uestco,dco] = cosamp2(phi,b,u_true,S);
[uestsp,dsp] = SPA(phi,S,b,u_true);
Dsp(k)=Dsp(k)+dsp;
Dco(k)=Dco(k)+dco;
Dmod3(k)=Dmod3(k)+dmod3;
D2(k)=D2(k)+d2;
D1(k)=D1(k)+d1;
end
end;
D1=D1/t;
Dco=Dco/t;
Dsp=Dsp/t;
Dmod=Dmod/t;
Dmod3=Dmod3/t;
D2=D2/t;
figure(1)
hold off
hold on
plot(A,D1,'k*--','LineWidth',2)
plot(A,D2,'m*--','LineWidth',2)
plot(A,Dmod3,'r*--','LineWidth',2)
plot(A,Dsp,'g*--','LineWidth',2)
plot(A,Dco,'o--','LineWidth',2)
legend('IRLS p=1','OMP','modified OMP','SP','CoSaMP')
grid
xlabel('Number of measurements M')
ylabel('Empirical probability of reconstruction at level 1e-3')
title('N=64 S=5 \Phi : undersampled DFT')
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
matlab_(含教程)通过matlab对比IRLS,OMP,MOMP,SP以及CoSaMP五种压缩感知算法的信号重构性能
资源推荐
资源详情
资源评论
收起资源包目录
matlab_(含教程)通过matlab对比IRLS,OMP,MOMP,SP以及CoSaMP五种压缩感知算法的信号重构性能.7z (9个子文件)
matlab_(含教程)通过matlab对比IRLS,OMP,MOMP,SP以及CoSaMP五种压缩感知算法的信号重构性能
untitled.jpg 37KB
教程.MP4 52.82MB
压缩感知的几种重构算法比较
Runme.m 2KB
func
OMP.m 500B
krored.m 194B
OMPmod3.m 1KB
IRLSregcomp.m 735B
cosamp2.m 876B
SPA.m 746B
共 9 条
- 1
资源评论
- zz11598922192024-03-15资源不错,内容挺好的,有一定的使用价值,值得借鉴,感谢分享。
- 残阳次杨2023-10-24资源内容详尽,对我有使用价值,谢谢资源主的分享。
- java_teacher1232024-05-19资源简直太好了,完美解决了当下遇到的难题,这样的资源很难不支持~
- Jason~2023-09-21感谢大佬分享的资源给了我灵感,果断支持!感谢分享~
mYlEaVeiSmVp
- 粉丝: 1948
- 资源: 19万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功