资源简介
陆吾生教授2010年压缩感知课程配套的matlab代码

代码片段和文件信息
% Program: ex3_1.m
% To implement the ISTA algorithm to the problem in Example 3.1
% (see pap. 36 - 38 of the notes).
% Input:
% m: number of rows (measurements) in matrix A.
% sig: standard deviation of noise w.
% lam: parameter \lambda.
% itrs: number of iterations to be performed.
% st1: initial randon state for random permutation of index {1 2 ... n}
% st2: initial random state for measurement noise w.
% Output:
% x: original signal.
% xh: reconstructed signal.
% err: relative reconstruction error.
% Written by W.-S. Lu University of Victoria.
% Example: [xxherr] = ex3_1(3800.20.3534157);
function [xxherr] = ex3_1(msiglamitrsst1st2)
% Prepare a signal x who is sparse in DCT domain
n = 1024;
dt = 1/2000;
T = 1023*dt;
t = 0:dt:T;
t = t(:);
x = sin(697*pi*t) + sin(1975*pi*t);
Dn = gen_dct(n);
% Get measurements
rand(‘state‘st1)
q = randperm(n);
q = q(:);
y = x(q(1:m));
randn(‘state‘st2)
w = sig*randn(m1);
yn = y + w;
Psi1 = Dn‘;
% Reconstruction of signal x by l1-minimization
A = Psi1(q(1:m):);
tmax = 1/max(eig(A*A‘));
tt = 0.95*tmax;
% thk = A‘*yn;
thk = zeros(n1);
alp = lam*tt;
for i = 1:itrs
ck = thk - 2*tt*A‘*(A*thk-yn);
thk = (max(abs(ck)-alp0)).*sign(ck);
end
xh = Psi1*thk;
err = norm(x-xh)/norm(x);
figure(1)
subplot(121)
plot(tx)
title(‘DCT-sparse signal‘)
xlabel(‘(a)‘)
axis([0 T -2.5 2.5])
grid
subplot(122)
plot(txh)
title(‘reconstructed‘)
xlabel(‘(b)‘)
axis([0 T -2.5 2.5])
grid
figure(2)
t1 = 50*dt:dt:100*dt;
plot(t1x(50:100)‘b‘t1xh(50:100)‘r‘‘linewidth‘ 1.5);
grid
xlabel(‘time‘)
title(‘51 samples of original (blue) vs reconstructed (red) with 380 noisy samples‘)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2010-11-18 10:33 matlab_program\
文件 49437 2005-11-18 14:55 matlab_program\camera256.mat
文件 1704 2010-11-16 06:53 matlab_program\ex3_1.m
文件 1812 2010-11-16 06:53 matlab_program\ex3_2.m
文件 2077 2010-11-16 07:47 matlab_program\fgp_denoise.m
文件 442 2010-11-16 06:54 matlab_program\gen_dct.m
文件 2173 2010-11-16 07:51 matlab_program\gp_deblurr.m
文件 1811 2010-11-16 07:48 matlab_program\gp_denoise.m
文件 550 2010-11-16 07:34 matlab_program\gp_denoise_w.m
文件 56686 2010-11-08 03:27 matlab_program\lena256.mat
文件 315 2010-11-16 07:20 matlab_program\oper_L.m
文件 237 2010-11-16 07:19 matlab_program\oper_Lt.m
文件 227 2010-11-16 07:16 matlab_program\proj_bound.m
文件 437 2010-11-16 07:13 matlab_program\proj_pair.m
- 上一篇:无网格法matlab程序
- 下一篇:matlab高斯-塞德尔迭代法
相关资源
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
- k近邻算法matlab实现
评论
共有 条评论