thtab67.m

来自「% Atomizer Main Directory, Version .802 」· M 代码 · 共 324 行

M
324
字号
% thtab67: BP Thesis Table 6.7 -- BP-Interior vs. BP-Simplex
% Signals: 
%	(1) TwinSine-2 with a 4-ovecomplete cosine dictionary
%	(2) Carbon with a wavelet packet dictionary
%	(3) WernerSorrows with a cosine packet dictionary D-4
%	(4) FM-Cosine with a cosine packet dictionary D-4
%	(5) Gong with a cosine packet dictionary D
%	(6) Denoising TwinSine-2 with a 4-overcomplete cosine dictionary
%	(7) Denoising Carbon with a wavelet packet dictionary
%	(8) Denoising WernerSorrows with a cosine packet dictionary D-4
%	(9) Denoising FM-Cosine with a cosine packet dictionary D-4
%	(10)Denoising Gong with a cosine packet dictionary D
% Signal Length: 64, 128, 256
% Observation:
%	CPU times in seconds recorded in Table 6.7
% Warning: This requires LSSOL and takes hours to run
%

help thtab67

%
% Sample Size: n = 64
%

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

FFDCT = MakeDict(n, 'DCT', 4, 0, 0); FFDCT = [FFDCT (-FFDCT)];
FFCP1 = MakeDict(n, 'CP', D-4, 0, 0); FFCP1 = [FFCP1 (-FFCP1)];
FFCP2 = MakeDict(n, 'CP', D, 0, 0); FFCP2 = [FFCP2 (-FFCP2)];
FFWP = MakeDict(n, 'WP', D, qmf, 0); FFWP = [FFWP (-FFWP)];

x = InputSignal('TwinSine2', n);
[cpu1, cpu2] = BPCompare(x, FFDCT);
disp('TwinSine-2');
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('Carbon', n);
[cpu1, cpu2] = BPCompare(x, FFWP);
disp('Carbon')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('WernerSorrows', n);
[cpu1, cpu2] = BPCompare(x, FFCP1);
disp('WernerSorrows')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('FM', n);
[cpu1, cpu2] = BPCompare(x, FFCP1);
disp('FM')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('Gong', n);
[cpu1, cpu2] = BPCompare(x, FFCP2);
disp('Gong')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('TwinSine2', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFDCT);
disp('Noisy TwinSine')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFWP);
disp('Noisy Carbon')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFCP1);
disp('Noisy WernerSorrows')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFCP1);
disp('Noisy FM-Cosine')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

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);
[cpu1, cpu2] = BPDNCompare(y, FFCP2);
disp('Noisy Gong');
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

%
% Sample Size: n = 128
%


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

FFDCT = MakeDict(n, 'DCT', 4, 0, 0); FFDCT = [FFDCT (-FFDCT)];
FFCP1 = MakeDict(n, 'CP', D-4, 0, 0); FFCP1 = [FFCP1 (-FFCP1)];
FFCP2 = MakeDict(n, 'CP', D, 0, 0); FFCP2 = [FFCP2 (-FFCP2)];
FFWP = MakeDict(n, 'WP', D, qmf, 0); FFWP = [FFWP (-FFWP)];

x = InputSignal('TwinSine2', n);
[cpu1, cpu2] = BPCompare(x, FFDCT);
disp('TwinSine-2');
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('Carbon', n);
[cpu1, cpu2] = BPCompare(x, FFWP);
disp('Carbon')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('WernerSorrows', n);
[cpu1, cpu2] = BPCompare(x, FFCP1);
disp('WernerSorrows')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('FM', n);
[cpu1, cpu2] = BPCompare(x, FFCP1);
disp('FM')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('Gong', n);
[cpu1, cpu2] = BPCompare(x, FFCP2);
disp('Gong')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('TwinSine2', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFDCT);
disp('Noisy TwinSine')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFWP);
disp('Noisy Carbon')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFCP1);
disp('Noisy WernerSorrows')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFCP1);
disp('Noisy FM-Cosine')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

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);
[cpu1, cpu2] = BPDNCompare(y, FFCP2);
disp('Noisy Gong');
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

%
% Sample Size: n = 256
%

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

FFDCT = MakeDict(n, 'DCT', 4, 0, 0); FFDCT = [FFDCT (-FFDCT)];
FFCP1 = MakeDict(n, 'CP', D-4, 0, 0); FFCP1 = [FFCP1 (-FFCP1)];
FFCP2 = MakeDict(n, 'CP', D, 0, 0); FFCP2 = [FFCP2 (-FFCP2)];
FFWP = MakeDict(n, 'WP', D, qmf, 0); FFWP = [FFWP (-FFWP)];

x = InputSignal('TwinSine2', n);
[cpu1, cpu2] = BPCompare(x, FFDCT);
disp('TwinSine-2');
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('Carbon', n);
[cpu1, cpu2] = BPCompare(x, FFWP);
disp('Carbon')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('WernerSorrows', n);
[cpu1, cpu2] = BPCompare(x, FFCP1);
disp('WernerSorrows')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('FM', n);
[cpu1, cpu2] = BPCompare(x, FFCP1);
disp('FM')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

x = InputSignal('Gong', n);
[cpu1, cpu2] = BPCompare(x, FFCP2);
disp('Gong')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('TwinSine2', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFDCT);
disp('Noisy TwinSine')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('Carbon', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFWP);
disp('Noisy Carbon')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('WernerSorrows', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFCP1);
disp('Noisy WernerSorrows')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

SNR = 1;
x = InputSignal('FM', n);
randn('seed', 12345678);
[x y]= NoiseMaker(x, SNR);
[cpu1, cpu2] = BPDNCompare(y, FFCP1);
disp('Noisy FM-Cosine')
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simplex  = %8.4e\n', cpu2);

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);
[cpu1, cpu2] = BPDNCompare(y, FFCP2);
disp('Noisy Gong');
fprintf('\n')
fprintf('CPU Running Time of Interior = %8.4e\n', cpu1);
fprintf('CPU Running Time of Simpexl  = %8.4e\n', cpu2);

⌨️ 快捷键说明

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