% toon0311 % toon0312 % toon0333 % toon0334 % toon0335 infoStr= ... [' ' ' Some Popular Wavelets: Haar, Daubechies, ' ' Coiflet, and Symmlet. ' ' ']; infoStr pause; % wave = MakeWavelet(4,8,'Haar',[],'Mother',1024); subplot(221); t = (1:1024)./1024; plot(t(300:800),wave(300:800)); title(' Haar Wavelet '); % wave = MakeWavelet(4,8,'Daubechies',4,'Mother',1024); subplot(222); plot(t(300:800),wave(300:800)); title(' D4 Wavelet '); % wave = MakeWavelet(4,8,'Coiflet',3,'Mother',1024); subplot(223); plot(t(300:800),wave(300:800)); title(' C3 Coiflet '); % wave = MakeWavelet(4,8,'Symmlet',8,'Mother',1024); subplot(224); plot(t(300:800),wave(300:800)); title(' S8 Symmlet '); pause infoStr= ... [' ' ' Wavelet Transform of Doppler Signal ' ' Coiflet 3, ' ' ']; dop = MakeSignal('Doppler', 256 ); qmf = MakeONFilter('Coiflet',3); wcDopp = FWT_PO(dop,1,qmf); % t = (1:256) ./256; subplot(211); plot(t, dop); title('Doppler') subplot(212); PlotWaveCoeff(wcDopp,1,1.); title('WT Dopp') %-------------------- pause infoStr= ... [' ' ' MRA of Doppler ' ' Haar wavelet ' ' ']; dop = MakeSignal('Doppler', 256 ); qmf = MakeONFilter('Haar'); wcDopp = FWT_PO(dop,1,qmf); % t = (1:256) ./256; subplot(121); plot(t, dop); title('Doppler') subplot(122); PlotMultiRes(wcDopp ,1,0.,qmf); title('MRA Dopp') pause infoStr= ... [' ' ' MRA of Doppler ' ' Coiflet 3, ' ' ']; qmf = MakeONFilter('Coiflet', 3); wcDopp = FWT_PO(dop,2,qmf); % t = (1:256) ./256; subplot(121); plot(t, dop); title('Doppler') subplot(122); PlotMultiRes(wcDopp ,2,0.,qmf); title('MRA Dopp') pause %--------------------------------------------------------- infoStr= ... [' ' ' Wavelet Transform and Singularities ' ' Here we analyze 4 functions: ' ' Ramp = t - (t >= .37); ' ' Crease = exp(-4*abs(t - .37)); ' ' Cusp = sqrt(abs(t - .37)); ' ' Sing = 1 ./abs(t - (k+.5)/2048); ' ' These have singularities of degree 0, 1, 1/2, and -1, ' ' respectively. ' ' ']; infoStr pause % toon0331 -- Behavior of Wavelet Transform of Singularities % % Here we analyze 4 functions: % % Ramp = t - (t >= .37); % Crease = exp(-4*abs(t - .37)); % Cusp = sqrt(abs(t - .37)); % Sing = 1 ./abs(t - (k+.5)/2048); % % These have singularities of degree 0, 1, 1/2, and -1, % respectively. % clear t; n = 4096; t = (1:n) ./n; Ramp = t - (t >= .37); Crease = exp(-4*abs(t - .37)); Cusp = sqrt(abs(t - .37)); k = floor(n * .37); Sing = 1 ./abs(t - (k+.5)/n); Sing = Sing ./ norm(Sing) .* 20; % subplot(221); plot(t, Sing); title(' Sing') subplot(222); plot(t, Ramp); title(' Ramp') subplot(223); plot(t, Cusp); title(' Cusp') subplot(224); plot(t, Crease); title(' Crease') pause %-------------------- % toon0332 -- Behavior of Wavelet Transform of Singularities % % Show the wavelet transforms of the signals in toon0331. % % Away from the singularities, % the wavelet coefficients decay rapidly % qmf = MakeONFilter('Coiflet',3); wcRamp = FWT_PO(Ramp,3,qmf); wcCrease = FWT_PO(Crease,3,qmf); wcCusp = FWT_PO(Cusp,3,qmf); wcSing = FWT_PO(Sing,3,qmf); % subplot(221); PlotWaveCoeff(wcSing,3,0.); title('WT Sing') subplot(222); PlotWaveCoeff(wcRamp,3,2.); title('WT Ramp') subplot(223); PlotWaveCoeff(wcCusp,3,2.); title('WT Cusp') subplot(224); PlotWaveCoeff(wcCrease,3,2.); title('WT Crease') % Repeat again!-------------------- pause subplot(421); plot(t, Sing); title(' Sing') subplot(422); plot(t, Ramp); title(' Ramp') subplot(425); plot(t, Cusp); title(' Cusp') subplot(426); plot(t, Crease); title(' Crease') subplot(423); PlotWaveCoeff(wcSing,3,0.); title('WT Sing') subplot(424); PlotWaveCoeff(wcRamp,3,2.); title('WT Ramp') subplot(427); PlotWaveCoeff(wcCusp,3,2.); title('WT Cusp') subplot(428); PlotWaveCoeff(wcCrease,3,2.); title('WT Crease') pause % toon0333 -- Behavior of Wavelet Transform of Singularities % % Show the MRA's of the signals in toon0331. % qmf = MakeONFilter('Coiflet',3); wcRamp = FWT_PO(Ramp,3,qmf); wcCrease = FWT_PO(Crease,3,qmf); wcCusp = FWT_PO(Cusp,3,qmf); wcSing = FWT_PO(Sing,3,qmf); % subplot(221); PlotMultiRes(wcRamp ,3,2.,qmf); title('MR Ramp') subplot(222); PlotMultiRes(wcCrease,3,2.,qmf); title('MR Crease') subplot(223); PlotMultiRes(wcCusp ,3,2.,qmf); title('MR Cusp') subplot(224); PlotMultiRes(wcSing ,3,0.,qmf); title('MR Sing')