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

📄 thtab65.m

📁 % Atomizer Main Directory, Version .802 里面信号含有分解去噪合成过程的代码 %---------------------------------------
💻 M
📖 第 1 页 / 共 2 页
字号:
disp(cpu3)

SNR = 1;
x = InputSignal('TwinSine2', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'DCT', 4, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'DCT', 4, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'DCT', 4, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy TwinSine-2');
disp(cpu1)
disp(cpu2)
disp(cpu3)


SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'WP', D, qmf, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'WP', D, qmf, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'WP', D, qmf, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy Carbon');
disp(cpu1)
disp(cpu2)
disp(cpu3)


SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy WernerSorrows')
disp(cpu1)
disp(cpu2)
disp(cpu3)


SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy FM-Cosine')
disp(cpu1)
disp(cpu2)
disp(cpu3)

SNR = 1;
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)];
%Noise level = 1
randn('seed', 2.055615866000000e+09);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'CP', D, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'CP', D, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'CP', D, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy Gong')
disp(cpu1)
disp(cpu2)
disp(cpu3)

%	
% Sample Size: n = 512
% 

n = 512; D= log2(n);
qmf = MakeONFilter('Symmlet', 8);

x = InputSignal('TwinSine2', n);
t = cputime;
c1 = BP_Interior(x, 'DCT', 4, 0, 0, 1e-1, 1e-1, 1e-1, 1e-4, 1e-4);
cpu1 = cputime - t;
t = cputime;
c2 = BP_Interior(x, 'DCT', 4, 0, 0, 1e-2, 1e-2, 1e-2, 1e-4, 1e-4);
cpu2 = cputime - t;
t = cputime;
c3 = BP_Interior(x, 'DCT', 4, 0, 0, 1e-3, 1e-3, 1e-3, 1e-4, 1e-4);
cpu3 = cputime - t;
disp('TwinSine-2');
disp(cpu1)
disp(cpu2)
disp(cpu3)

x = InputSignal('Carbon', n);
t = cputime;
c1 = BP_Interior(x, 'WP', D, qmf, 0, 1e-1, 1e-1, 1e-1, 1e-4, 1e-4);
cpu1 = cputime - t;
t = cputime;
c2 = BP_Interior(x, 'WP', D, qmf, 0, 1e-2, 1e-2, 1e-2, 1e-4, 1e-4);
cpu2 = cputime - t;
t = cputime;
c3 = BP_Interior(x, 'WP', D, qmf, 0, 1e-3, 1e-3, 1e-3, 1e-4, 1e-4);
cpu3 = cputime - t;
disp('Carbon')
disp(cpu1)
disp(cpu2)
disp(cpu3)

x = InputSignal('WernerSorrows', n);
t = cputime;
c1 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-1, 1e-1, 1e-1, 1e-4, 1e-4);
cpu1 = cputime - t;
t = cputime;
c2 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-2, 1e-2, 1e-2, 1e-4, 1e-4);
cpu2 = cputime - t;
t = cputime;
c3 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-3, 1e-3, 1e-3, 1e-4, 1e-4);
cpu3 = cputime - t;
disp('WernerSorrows')
disp(cpu1)
disp(cpu2)
disp(cpu3)

x = InputSignal('FM', n);
t = cputime;
c1 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-1, 1e-1, 1e-1, 1e-4, 1e-4);
cpu1 = cputime - t;
t = cputime;
c2 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-2, 1e-2, 1e-2, 1e-4, 1e-4);
cpu2 = cputime - t;
t = cputime;
c3 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-3, 1e-3, 1e-3, 1e-4, 1e-4);
cpu3 = cputime - t;
disp('FM-Cosine')
disp(cpu1)
disp(cpu2)
disp(cpu3)


x = InputSignal('Gong', n);
t = cputime;
c1 = BP_Interior(x, 'CP', D, 0, 0, 1e-1, 1e-1, 1e-1, 1e-4, 1e-4);
cpu1 = cputime - t;
t = cputime;
c2 = BP_Interior(x, 'CP', D, 0, 0, 1e-2, 1e-2, 1e-2, 1e-4, 1e-4);
cpu2 = cputime - t;
t = cputime;
c3 = BP_Interior(x, 'CP', D, 0, 0, 1e-3, 1e-3, 1e-3, 1e-4, 1e-4);
cpu3 = cputime - t;
disp('Gong')
disp(cpu1)
disp(cpu2)
disp(cpu3)

SNR = 1;
x = InputSignal('TwinSine2', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'DCT', 4, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'DCT', 4, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'DCT', 4, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy TwinSine-2');
disp(cpu1)
disp(cpu2)
disp(cpu3)


SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'WP', D, qmf, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'WP', D, qmf, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'WP', D, qmf, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy Carbon');
disp(cpu1)
disp(cpu2)
disp(cpu3)


SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy WernerSorrows')
disp(cpu1)
disp(cpu2)
disp(cpu3)


SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy FM-Cosine')
disp(cpu1)
disp(cpu2)
disp(cpu3)

SNR = 1;
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)];
%Noise level = 1
randn('seed', 2.055615866000000e+09);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'CP', D, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'CP', D, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'CP', D, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy Gong')
disp(cpu1)
disp(cpu2)
disp(cpu3)

%	
% Sample Size: n = 1024
% 

n = 1024; D= log2(n);
qmf = MakeONFilter('Symmlet', 8);

x = InputSignal('TwinSine2', n);
t = cputime;
c1 = BP_Interior(x, 'DCT', 4, 0, 0, 1e-1, 1e-1, 1e-1, 1e-4, 1e-4);
cpu1 = cputime - t;
t = cputime;
c2 = BP_Interior(x, 'DCT', 4, 0, 0, 1e-2, 1e-2, 1e-2, 1e-4, 1e-4);
cpu2 = cputime - t;
t = cputime;
c3 = BP_Interior(x, 'DCT', 4, 0, 0, 1e-3, 1e-3, 1e-3, 1e-4, 1e-4);
cpu3 = cputime - t;
disp('TwinSine-2');
disp(cpu1)
disp(cpu2)
disp(cpu3)

x = InputSignal('Carbon', n);
t = cputime;
c1 = BP_Interior(x, 'WP', D, qmf, 0, 1e-1, 1e-1, 1e-1, 1e-4, 1e-4);
cpu1 = cputime - t;
t = cputime;
c2 = BP_Interior(x, 'WP', D, qmf, 0, 1e-2, 1e-2, 1e-2, 1e-4, 1e-4);
cpu2 = cputime - t;
t = cputime;
c3 = BP_Interior(x, 'WP', D, qmf, 0, 1e-3, 1e-3, 1e-3, 1e-4, 1e-4);
cpu3 = cputime - t;
disp('Carbon')
disp(cpu1)
disp(cpu2)
disp(cpu3)

x = InputSignal('WernerSorrows', n);
t = cputime;
c1 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-1, 1e-1, 1e-1, 1e-4, 1e-4);
cpu1 = cputime - t;
t = cputime;
c2 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-2, 1e-2, 1e-2, 1e-4, 1e-4);
cpu2 = cputime - t;
t = cputime;
c3 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-3, 1e-3, 1e-3, 1e-4, 1e-4);
cpu3 = cputime - t;
disp('WernerSorrows')
disp(cpu1)
disp(cpu2)
disp(cpu3)

x = InputSignal('FM', n);
t = cputime;
c1 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-1, 1e-1, 1e-1, 1e-4, 1e-4);
cpu1 = cputime - t;
t = cputime;
c2 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-2, 1e-2, 1e-2, 1e-4, 1e-4);
cpu2 = cputime - t;
t = cputime;
c3 = BP_Interior(x, 'CP', D-4, 0, 0, 1e-3, 1e-3, 1e-3, 1e-4, 1e-4);
cpu3 = cputime - t;
disp('FM-Cosine')
disp(cpu1)
disp(cpu2)
disp(cpu3)


x = InputSignal('Gong', n);
t = cputime;
c1 = BP_Interior(x, 'CP', D, 0, 0, 1e-1, 1e-1, 1e-1, 1e-4, 1e-4);
cpu1 = cputime - t;
t = cputime;
c2 = BP_Interior(x, 'CP', D, 0, 0, 1e-2, 1e-2, 1e-2, 1e-4, 1e-4);
cpu2 = cputime - t;
t = cputime;
c3 = BP_Interior(x, 'CP', D, 0, 0, 1e-3, 1e-3, 1e-3, 1e-4, 1e-4);
cpu3 = cputime - t;
disp('Gong')
disp(cpu1)
disp(cpu2)
disp(cpu3)

SNR = 1;
x = InputSignal('TwinSine2', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'DCT', 4, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'DCT', 4, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'DCT', 4, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy TwinSine-2');
disp(cpu1)
disp(cpu2)
disp(cpu3)


SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'WP', D, qmf, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'WP', D, qmf, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'WP', D, qmf, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy Carbon');
disp(cpu1)
disp(cpu2)
disp(cpu3)


SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy WernerSorrows')
disp(cpu1)
disp(cpu2)
disp(cpu3)


SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'CP', D-4, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy FM-Cosine')
disp(cpu1)
disp(cpu2)
disp(cpu3)

SNR = 1;
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)];
%Noise level = 1
randn('seed', 2.055615866000000e+09);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BPDN_Interior(y, 'CP', D, 0, 0, 1e-1, 1e-1, 1e-1);
cpu1 = cputime - t;
t = cputime;
xrec2 = BPDN_Interior(y, 'CP', D, 0, 0, 1e-2, 1e-2, 1e-2);
cpu2 = cputime - t;
t = cputime;
xrec3 = BPDN_Interior(y, 'CP', D, 0, 0, 1e-3, 1e-3, 1e-3);
cpu3 = cputime - t;
disp('Noisy Gong')
disp(cpu1)
disp(cpu2)
disp(cpu3)

⌨️ 快捷键说明

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