📄 thfig31.m
字号:
% thfig31: BP Thesis Figure 3.1 -- Analyzing Carbon
%
% (1) BOB cannot separate nonorthogonal atoms
% (2) MP has difficulty in separate similar (close, overlapping) atoms
% (3) BasisPursuit could handle both nonorthogonal and similar atoms
%
% Signal: Carbon
% Signal Length: 512
% Dictionary: Wavelet Packets with D = log2(n) and qmf = (Symmlet, 8)
% Observation:
% (a) The signal: Carbon, which is made up of 4 close atoms from WP
% (b) MOF phase plane is smeared out and very weak.
% (c) BOB fails to pick up the dirac and two other atoms.
% Instead, it is using orthogonal atoms to represent the
% nonorthogonal structure.
% (d) MP picks up the dirac and the sinusoid, but it fails to
% separate the four close WP atoms. MP initially selects
% neither one of the 4 true atoms. Instead, it selects
% the atom at the center of the 4 true atoms, the atom which
% has a bigger cosine product with the signal than any of
% the 4 true atoms. Because of this mistake, MP is forced to
% make a series of alternating corrections, which suggests
% a rather complicated structure.
% (e) BP does a perfect job.
%
help thfig31
n = 512; D = log2(n);
qmf = MakeONFilter('Symmlet', 8);
x = InputSignal('Carbon', n);
time = cputime;
cMOF = MOF(x, 'WP', D, qmf, 0);
cputime1 = cputime - time;
time = cputime;
cBOB = BOB(x, 'WP', D, qmf, 0);
cputime2 = cputime - time;
time = cputime;
cMP = MP(x, 'WP', D, qmf, 0);
cputime3 = cputime - time;
time = cputime;
cBP = BP_Interior(x, 'WP', D, qmf, 0);
cputime4 = cputime - time;
fprintf('\n')
fprintf('CPU Running Time of MOF = %8.4e\n', cputime1);
fprintf('CPU Running Time of BOB = %8.4e\n', cputime2);
fprintf('CPU Running Time of MP = %8.4e\n', cputime3);
fprintf('CPU Running Time of BP = %8.4e\n', cputime4);
%%%Figures
figure(1);clf
subplot(3,2,1);
t = (1:n)' / n;
plot(t, x);title('(a) Signal: Carbon');
NameOfDict = 'WP'; par2 = qmf; TFScale = 1;
subplot(3,2,3);PhasePlane(cMOF, NameOfDict, n, par2, 256, TFScale);
subplot(3,2,4);PhasePlane(cBOB, NameOfDict, n, par2, 256, TFScale);
subplot(3,2,5);PhasePlane(cMP, NameOfDict, n, par2, 256, TFScale);
subplot(3,2,6);PhasePlane(cBP, NameOfDict, n, par2, 256, TFScale);
subplot(3,2,3); title('(b) Phase Plane: MOF')
subplot(3,2,4); title('(c) Phase Plane: BOB')
subplot(3,2,5); title('(d) Phase Plane: MP')
subplot(3,2,6); title('(e) Phase Plane: BP')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -