📄 thfig27.m
字号:
% thfig27: BP Thesis Figure 2.7 -- Analyzing WernerSorrows
%
% (1) BOB by C-W entropy can be improved by BOB by l^1 entropy.
% (2) BOB by l^1 entropy can be improved by BP.
%
% Signal: WernerSorrows
% Signal Length: 1024
% Dictionary: Cosine Packets with D= log2(n)-4
% Observations:
% (a) Signal: WernerSorrows, a signal made up of a sinusoid and
% two chirps.
% (b) Phase plane from BOB by C-W entropy(like l^2). BOB chooses
% Fourier basis, and totally fails to find the chirp structures
% (c) Phase plane from BOB by l^1 entropy. We can basically observe
% the three structures in the signal.
% (d) Phase plane from BP. Compared with (c), BP clearly
% reveals the sinusoid and the two chrips.
%
help thfig27
n = 1024; D = log2(n);
t = (1:n)' ./n;
bell = 'Sine';
x = InputSignal('WernerSorrows',n);
%BOB with Coifman-Wickerhauser Entropy
cBOB1 = BOB(x, 'CP', D-4, bell, 0, 'Entropy');
%BOB with l^1 Entropy
time = cputime;
cBOB2 = BOB(x, 'CP', D-4, bell, 0, 'l^p', 1);
cputime2 = cputime - time;
%BP
time = cputime;
cBP = BP_Interior(x, 'CP', D-4, bell, 0);
cputime4 = cputime - time;
fprintf('\n')
fprintf('CPU Running Time of BOB = %8.4e\n', cputime2);
fprintf('CPU Running Time of BP = %8.4e\n', cputime4);
TFNORM = 64.5218;
figure(1);clf;
subplot(2,2,1);
plot(t,x);title('(a) Signal: Werner Sorrows')
subplot(2,2,2);
PhasePlane(cBOB1, 'CP', n, 0, 256, TFNORM);
title('(b) Phase Plane: BOB by C-W Entropy')
subplot(2,2,3);
PhasePlane(cBOB2, 'CP', n, 0, 256, TFNORM);
title('(c) Phase Plane: BOB by l^1 Entropy')
subplot(2,2,4);
PhasePlane(cBP, 'CP', n, 0, 256, TFNORM);
title('(d) Phase Plane: BP')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -