centerPeriods

CWT filter bank bandpass center periods

Description

example

p = centerPeriods(fb) returns the wavelet bandpass center periods p for the continuous wavelet transform (CWT) filter bank fb.

Examples

collapse all

Create two CWT filter banks. Set the sampling period of the first filter bank to 0.5 seconds, and the sampling frequency of the second filter bank to 2 Hz.

fb = cwtfilterbank('SamplingPeriod',seconds(0.5));
fb2 = cwtfilterbank('SamplingFrequency',2);

Obtain the bandpass center periods of both filter banks. Confirm the center periods of both filter banks are equal.

bp = centerPeriods(fb);
bp2 = centerPeriods(fb2);
bp(1:5)
ans = 5x1 duration array
   1.1517 sec
   1.2344 sec
    1.323 sec
    1.418 sec
   1.5197 sec

bp2(1:5)
ans = 5×1

    1.1517
    1.2344
    1.3230
    1.4180
    1.5197

Obtain the bandpass center frequencies of the second filter bank. Confirm the reciprocals of the center frequencies are equal to the center periods.

f2 = centerFrequencies(fb2);
1./f2(1:5)
ans = 5×1

    1.1517
    1.2344
    1.3230
    1.4180
    1.5197

Input Arguments

collapse all

Continuous wavelet transform (CWT) filter bank, specified as a cwtfilterbank object.

Output Arguments

collapse all

Wavelet bandpass center periods, returned as a real-valued vector of length Ns, where Ns is the number of scales in the filter bank.

If SamplingPeriod is specified, p is a duration array with the same units and format as SamplingPeriod. If SamplingFrequency is specified, p is in seconds.

Introduced in R2018b