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

📄 thfig52.m

📁 % Atomizer Main Directory, Version .802 里面信号含有分解去噪合成过程的代码 %---------------------------------------
💻 M
字号:
% thfig52: BP Thesis Figure 5.2 -- DeNoising noisy Gong
% Signal:	Gong, SNR = 1
% Signal Length: 1024
% Dictionary: Cosine Packets with D=log2(n)
% Observations:
%	(a) Signal: Gong
%	(b) The Noised: SNR = 1
%	(c) Denoising by MOF: It doesn't help at all due to simple linear
%	    shinkage
%	(d) Denoising by BOB: cannot quite recover the fine decaying
%	    structure
%	(e) Denoising by MP: cannot quite recover the fine decaying
%	    structure
%	(f) BPDenoising: tt recovers the fine decaying
%	    structure

help thfig52

n = 1024; D = log2(n); 
x = InputSignal('Gong', n);
t = (1:n)' /n;
x = cos(t * pi/4 * n) ./ ((1:n) .^ .5)';
m = floor(3 *n/4);
x = [zeros(n-m,1);x(1:m)];

SNR = 1;
%Noise level = 1
randn('seed', 2.055615866000000e+09);
[x y]= NoiseMaker(x, SNR);
sigma = 1;

time = cputime;
xrecMOF = MOFDN(y, 'CP', D, 'Sine', 0);
cputime1 = cputime - time;
time = cputime;
xrecBOB = BOBDN(y, 'CP', D, 'Sine', 0);
cputime2 = cputime - time;
time = cputime;
xrecMP = MPDN(y, 'CP', D, 'Sine', 0);
cputime3 = cputime - time;
time = cputime;
xrecBP = BPDN_Interior(y, 'CP', D, 'Sine', 0);
cputime4 = cputime - time;

fprintf('\n')
fprintf('CPU Running Time of MOFDN = %8.4e\n', cputime1);
fprintf('CPU Running Time of BOBDN = %8.4e\n', cputime2);
fprintf('CPU Running Time of  MPDN = %8.4e\n', cputime3);
fprintf('CPU Running Time of  BPDN = %8.4e\n', cputime4);

%Figure
figure(1);clf
t = (1:n)' / n;
subplot(3,2,1); plot(t, x); title('(a) The Truth')
AXIS = axis;
subplot(3,2,2); plot(t, y); 
titlestr = sprintf('(b) The Noised: SNR = %g', SNR);
title(titlestr)
subplot(3,2,3); plot(t, xrecMOF); title('(c) Recovered: MOF')
axis(AXIS);
subplot(3,2,4); plot(t, xrecBOB); title('(d) Recovered: BOB')
axis(AXIS);
subplot(3,2,5); plot(t, xrecMP); title('(e) Recovered: MP')
axis(AXIS);
subplot(3,2,6); plot(t, xrecBP); title('(f) Recovered: BP')
axis(AXIS);
subplot(3,2,3); AXIS = axis;
subplot(3,2,1); title('(a) Signal: Gong'); axis(AXIS);
subplot(3,2,2); axis(AXIS);

⌨️ 快捷键说明

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