CWT filter bank scales
CWT Filter Bank Scales
Create a CWT filter bank with sampling period equal to 0.001 seconds.
fb = cwtfilterbank('SamplingPeriod',seconds(0.001));
Obtain the raw and converted scales used in creating the wavelet bandpass filters.
[rs,cs] = scales(fb);
Obtain the filter bank bandpass center periods.
P = centerPeriods(fb);
Compare the finest converted scale with the smallest bandpass center period normalized by the sampling period.
ans = 2.3035
ans = 2.3035
The scales should increase by a factor of approximately , where is the number of voices per octave. The default value of is 10. Plot the ratios of successive scales and compare with .
len = length(rs); plot(rs(2:len)./rs(1:len-1),'rx-') hold on plot(1:len-1,2^(1/10)*ones(1,len-1),'b') title('Successive Scale Ratios') legend('Scale Ratio','Scale Factor')
fb — Continuous wavelet transform filter bank
Continuous wavelet transform (CWT) filter bank, specified as a
rs — Raw scales
Raw scales used in creating the wavelet bandpass filters, returned as a real-valued vector of length Ns, where Ns is the number of wavelet bandpass frequencies (equal to the number of scales).
cs — Converted scales
Converted scales used in creating the wavelet bandpass filters, returned
as a real-valued vector of length Ns, where
Ns is the number of wavelet bandpass frequencies
(equal to the number of scales).
cs is in units of the
sampling frequency or sampling period.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Introduced in R2018a