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

📄 thtab66.m

📁 % Atomizer Main Directory, Version .802 里面信号含有分解去噪合成过程的代码 %---------------------------------------
💻 M
📖 第 1 页 / 共 3 页
字号:
cpu2 = cputime - t;
t = cputime;
xrec3 = MPDN(y, 'WP', D, qmf, 0);
cpu3 = cputime - t;
disp('Noisy Carbon');
fprintf('CPU Running Time of MOFDN = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOBDN = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MPDN = %8.4e\n', cpu3);



SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = MOFDN(y, 'CP', D-4, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
xrec2 = BOBDN(y, 'CP', D-4, 0, 0);
cpu2 = cputime - t;
t = cputime;
xrec3 = MPDN(y, 'CP', D-4, 0, 0);
cpu3 = cputime - t;
disp('Noisy WernerSorrows')
fprintf('CPU Running Time of MOFDN = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOBDN = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MPDN = %8.4e\n', cpu3);


SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = MOFDN(y, 'CP', D-4, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
xrec2 = BOBDN(y, 'CP', D-4, 0, 0);
cpu2 = cputime - t;
t = cputime;
xrec3 = MPDN(y, 'CP', D-4, 0, 0);
cpu3 = cputime - t;
disp('Noisy FM-Cosine')
fprintf('CPU Running Time of MOFDN = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOBDN = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MPDN = %8.4e\n', 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 = MOFDN(y, 'CP', D, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
xrec2 = BOBDN(y, 'CP', D, 0, 0);
cpu2 = cputime - t;
t = cputime;
xrec3 = MPDN(y, 'CP', D, 0, 0);
cpu3 = cputime - t;
disp('Noisy Gong')
fprintf('CPU Running Time of MOFDN = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOBDN = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MPDN = %8.4e\n', cpu3);

%	
% Sample Size: n = 1024
% 

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

x = InputSignal('TwinSine2', n);
t = cputime;
c1 = MOF(x, 'DCT', 4, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
c3 = MP(x, 'DCT', 4, 0, 0, natom, 1e-2);
cpu3 = cputime - t;
disp('TwinSine-2');
fprintf('\n')
fprintf('CPU Running Time of MOF = %8.4e\n', cpu1);
fprintf('CPU Running Time of  MP = %8.4e\n', cpu3);

x = InputSignal('Carbon', n);
t = cputime;
c1 = MOF(x, 'WP', D, qmf, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
c2 = BOB(x, 'WP', D, qmf, 0);
cpu2 = cputime - t;
t = cputime;
c3 = MP(x, 'WP', D, qmf, 0, natom, 1e-2);
cpu3 = cputime - t;
disp('Carbon')
fprintf('\n')
fprintf('CPU Running Time of MOF = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOB = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MP = %8.4e\n', cpu3);


x = InputSignal('WernerSorrows', n);
t = cputime;
c1 = MOF(x, 'CP', D-4, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
c2 = BOB(x, 'CP', D-4, 0, 0);
cpu2 = cputime - t;
t = cputime;
c3 = MP(x, 'CP', D-4, 0, 0, natom, 1e-2);
cpu3 = cputime - t;
disp('WernerSorrows')
fprintf('\n')
fprintf('CPU Running Time of MOF = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOB = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MP = %8.4e\n', cpu3);


x = InputSignal('FM', n);
t = cputime;
c1 = MOF(x, 'CP', D-4, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
c2 = BOB(x, 'CP', D-4, 0, 0);
cpu2 = cputime - t;
t = cputime;
c3 = MP(x, 'CP', D-4, 0, 0, natom, 1e-2);
cpu3 = cputime - t;
disp('FM-Cosine')
fprintf('\n')
fprintf('CPU Running Time of MOF = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOB = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MP = %8.4e\n', cpu3);


x = InputSignal('Gong', n);
t = cputime;
c1 = MOF(x, 'CP', D, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
c2 = BOB(x, 'CP', D, 0, 0);
cpu2 = cputime - t;
t = cputime;
c3 = MP(x, 'CP', D, 0, 0, natom, 1e-2);
cpu3 = cputime - t;
fprintf('\n')
fprintf('CPU Running Time of MOF = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOB = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MP = %8.4e\n', cpu3);


SNR = 1;
x = InputSignal('TwinSine2', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = MOFDN(y, 'DCT', 4, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
xrec3 = MPDN(y, 'DCT', 4, 0, 0);
cpu3 = cputime - t;
disp('Noisy TwinSine-2');
fprintf('\n')
fprintf('CPU Running Time of MOFDN = %8.4e\n', cpu1);
fprintf('CPU Running Time of  MPDN = %8.4e\n', cpu3);


SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = MOFDN(y, 'WP', D, qmf, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
xrec2 = BOBDN(y, 'WP', D, qmf, 0);
cpu2 = cputime - t;
t = cputime;
xrec3 = MPDN(y, 'WP', D, qmf, 0);
cpu3 = cputime - t;
disp('Noisy Carbon');
fprintf('CPU Running Time of MOFDN = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOBDN = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MPDN = %8.4e\n', cpu3);



SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = MOFDN(y, 'CP', D-4, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
xrec2 = BOBDN(y, 'CP', D-4, 0, 0);
cpu2 = cputime - t;
t = cputime;
xrec3 = MPDN(y, 'CP', D-4, 0, 0);
cpu3 = cputime - t;
disp('Noisy WernerSorrows')
fprintf('CPU Running Time of MOFDN = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOBDN = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MPDN = %8.4e\n', cpu3);


SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = MOFDN(y, 'CP', D-4, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
xrec2 = BOBDN(y, 'CP', D-4, 0, 0);
cpu2 = cputime - t;
t = cputime;
xrec3 = MPDN(y, 'CP', D-4, 0, 0);
cpu3 = cputime - t;
disp('Noisy FM-Cosine')
fprintf('CPU Running Time of MOFDN = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOBDN = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MPDN = %8.4e\n', 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 = MOFDN(y, 'CP', D, 0, 0, 1e-10);
cpu1 = cputime - t;
t = cputime;
xrec2 = BOBDN(y, 'CP', D, 0, 0);
cpu2 = cputime - t;
t = cputime;
xrec3 = MPDN(y, 'CP', D, 0, 0);
cpu3 = cputime - t;
disp('Noisy Gong')
fprintf('CPU Running Time of MOFDN = %8.4e\n', cpu1);
fprintf('CPU Running Time of BOBDN = %8.4e\n', cpu2);
fprintf('CPU Running Time of  MPDN = %8.4e\n', cpu3);

%
% (2) BOB
%

%	
% Sample Size: n = 64
% 

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

x = InputSignal('Carbon', n);
t = cputime;
c1 = BOB(x, 'WP', D, qmf, 0);
cpu1 = cputime - t;
disp('Carbon')
disp(cpu1)

x = InputSignal('WernerSorrows', n);
t = cputime;
c1 = BOB(x, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('WernerSorrows')
disp(cpu1)

x = InputSignal('FM', n);
t = cputime;
c1 = BOB(x, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('FM-Cosine')
disp(cpu1)

x = InputSignal('Gong', n);
t = cputime;
c1 = BOB(x, 'CP', D, 0, 0);
cpu1 = cputime - t;
disp('Gong')
disp(cpu1)

SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'WP', D, qmf, 0);
cpu1 = cputime - t;
disp('Noisy Carbon');
disp(cpu1)

SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('Noisy WernerSorrows')
disp(cpu1)

SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('Noisy FM-Cosine')
disp(cpu1)

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 = BOBDN(y, 'CP', D, 0, 0);
cpu1 = cputime - t;
disp('Noisy Gong')
disp(cpu1)


%	
% Sample Size: n = 128
% 

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

x = InputSignal('Carbon', n);
t = cputime;
c1 = BOB(x, 'WP', D, qmf, 0);
cpu1 = cputime - t;
disp('Carbon')
disp(cpu1)

x = InputSignal('WernerSorrows', n);
t = cputime;
c1 = BOB(x, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('WernerSorrows')
disp(cpu1)

x = InputSignal('FM', n);
t = cputime;
c1 = BOB(x, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('FM-Cosine')
disp(cpu1)

x = InputSignal('Gong', n);
t = cputime;
c1 = BOB(x, 'CP', D, 0, 0);
cpu1 = cputime - t;
disp('Gong')
disp(cpu1)

SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'WP', D, qmf, 0);
cpu1 = cputime - t;
disp('Noisy Carbon');
disp(cpu1)

SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('Noisy WernerSorrows')
disp(cpu1)

SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('Noisy FM-Cosine')
disp(cpu1)

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 = BOBDN(y, 'CP', D, 0, 0);
cpu1 = cputime - t;
disp('Noisy Gong')
disp(cpu1)


%	
% Sample Size: n = 256
% 

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

x = InputSignal('Carbon', n);
t = cputime;
c1 = BOB(x, 'WP', D, qmf, 0);
cpu1 = cputime - t;
disp('Carbon')
disp(cpu1)

x = InputSignal('WernerSorrows', n);
t = cputime;
c1 = BOB(x, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('WernerSorrows')
disp(cpu1)

x = InputSignal('FM', n);
t = cputime;
c1 = BOB(x, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('FM-Cosine')
disp(cpu1)

x = InputSignal('Gong', n);
t = cputime;
c1 = BOB(x, 'CP', D, 0, 0);
cpu1 = cputime - t;
disp('Gong')
disp(cpu1)

SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'WP', D, qmf, 0);
cpu1 = cputime - t;
disp('Noisy Carbon');
disp(cpu1)

SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('Noisy WernerSorrows')
disp(cpu1)

SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('Noisy FM-Cosine')
disp(cpu1)

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 = BOBDN(y, 'CP', D, 0, 0);
cpu1 = cputime - t;
disp('Noisy Gong')
disp(cpu1)


%	
% Sample Size: n = 512
% 

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

x = InputSignal('Carbon', n);
t = cputime;
c1 = BOB(x, 'WP', D, qmf, 0);
cpu1 = cputime - t;
disp('Carbon')
disp(cpu1)

x = InputSignal('WernerSorrows', n);
t = cputime;
c1 = BOB(x, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('WernerSorrows')
disp(cpu1)

x = InputSignal('FM', n);
t = cputime;
c1 = BOB(x, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('FM-Cosine')
disp(cpu1)

x = InputSignal('Gong', n);
t = cputime;
c1 = BOB(x, 'CP', D, 0, 0);
cpu1 = cputime - t;
disp('Gong')
disp(cpu1)

SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'WP', D, qmf, 0);
cpu1 = cputime - t;
disp('Noisy Carbon');
disp(cpu1)

SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('Noisy WernerSorrows')
disp(cpu1)

SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('Noisy FM-Cosine')
disp(cpu1)

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 = BOBDN(y, 'CP', D, 0, 0);
cpu1 = cputime - t;
disp('Noisy Gong')
disp(cpu1)


%	
% Sample Size: n = 1024
% 

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

x = InputSignal('Carbon', n);
t = cputime;
c1 = BOB(x, 'WP', D, qmf, 0);
cpu1 = cputime - t;
disp('Carbon')
disp(cpu1)

x = InputSignal('WernerSorrows', n);
t = cputime;
c1 = BOB(x, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('WernerSorrows')
disp(cpu1)

x = InputSignal('FM', n);
t = cputime;
c1 = BOB(x, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('FM-Cosine')
disp(cpu1)

x = InputSignal('Gong', n);
t = cputime;
c1 = BOB(x, 'CP', D, 0, 0);
cpu1 = cputime - t;
disp('Gong')
disp(cpu1)

SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'WP', D, qmf, 0);
cpu1 = cputime - t;
disp('Noisy Carbon');
disp(cpu1)

SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('Noisy WernerSorrows')
disp(cpu1)

SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
t = cputime;
xrec1 = BOBDN(y, 'CP', D-4, 0, 0);
cpu1 = cputime - t;
disp('Noisy FM-Cosine')
disp(cpu1)

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 = BOBDN(y, 'CP', D, 0, 0);
cpu1 = cputime - t;
disp('Noisy Gong')
disp(cpu1)

%
% (3) MP
%


%	
% Sample Size: n = 64
% 

n = 64; D= log2(n);
qmf = MakeONFilter('Symmlet', 8);
natom = n^2;

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

x = InputSignal('Carbon', n);

⌨️ 快捷键说明

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