Main Content

getFilters

Obtain single-stage filters

Description

example

c = getFilters(src) returns the multirate filters cascaded together in src to perform the overall sample rate conversion. The result is a FilterCascade structure, c. Each field of c holds the filter used at a particular stage and gives access to its coefficients and rate-change factors.

Examples

collapse all

Create src, a multistage sample rate converter with default properties. src converts between 192 kHz and 44.1 kHz. Find the individual filters that are cascaded together to perform the conversion.

src = dsp.SampleRateConverter;
c = getFilters(src);

Visualize the frequency response of the decimator used in the first stage of the process.

m = c.Stage1;

[h,w] = freqz(m);
plot(w/pi,20*log10(abs(h)))
xlabel('\omega / \pi')
ylabel('Magnitude (dB)')

Input Arguments

collapse all

Multistage sample rate converter, specified as a dsp.SampleRateConverter System object.

Output Arguments

collapse all

Single-stage filters, returned as a FilterCascade structure.

Introduced in R2014b