This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

scales

CWT filter bank scales

Syntax

rs = scales(fb)
[rs,cs] = scales(fb)

Description

rs = scales(fb) returns the raw (unitless) scales used in creating the wavelet bandpass filters. Scales are ordered from finest scale to coarsest scale.

example

[rs,cs] = scales(fb) returns the wavelet scales converted to units of the sampling frequency or sampling period.

Examples

collapse all

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.

min(cs)
ans = 2.3035
min(P)/seconds(0.001)
ans = 2.3035

The scales should increase by a factor of approximately 2^(1/|NV|) where NV is the number of voices per octave. The default value of NV is 10. Plot the ratios of successive scales, and compare with 2^(1/10).

2^(1/10)
ans = 1.0718
len = length(rs);
plot(rs(2:len)./rs(1:len-1))
title('Successive Ratios')

Input Arguments

collapse all

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

Output Arguments

collapse all

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).

Data Types: double

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.

Data Types: double

Introduced in R2018a