thtab65.m

来自「% Atomizer Main Directory, Version .802 」· M 代码 · 共 918 行 · 第 1/2 页

M
918
字号
% thtab65: BP Thesis Table 6.5 -- BP_Interior Complexity
% Signal:
%	TwinSine-2	4-overcomplete DCT
%	Carbon		WP
%	WernerSorrows	CP D-4
%	FM-Cosine	CP D-4
%	Gong		CP D
%	Noisy TwinSine-2
%	Noisy Carbon
%	Noisy WernerSorrows
%	Noisy FM-Cosine
%	Noisy Gong
% Signal Length:
%	64, 128, 256, 512, 1024
% Parameter Setting: 1e-1, 1e-2, 1e-3
% Observation:
%	CPU times in seconds recorded in Table 6.5
% Warning: This takes hours to run
%

help thtab65

n = 64; 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 = 128
% 

n = 128; 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 = 256
% 

n = 256; 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)

⌨️ 快捷键说明

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