scaleFilterSections
Description
Examples
Scale Second-Order Section Matrix
Design a 14th-order elliptic bandpass filter with a lower passband frequency of rad/sample and a higher passband frequency of rad/sample. Specify 10 dB of passband ripple and 40 dB of stopband attenuation. Convert the zeros, poles, and gain to a cascaded transfer function format.
N = 14; [z,p,k] = ellip(N/2,10,40,[0.2 0.6]); [sos,g] = zp2sos(z,p,k);
Use scaleFilterSections
to scale the filter numerator coefficients so that the gain is uniformly distributed across all sections. Visualize the magnitude response of the filter.
ctfNum = sos(:,1:3); ctfDen = sos(:,4:end); ctfNumG = scaleFilterSections(ctfNum,g); sosG = [ctfNum ctfDen]; [h,f] = freqz(sosG,4096); plot(f/pi,mag2db(abs(h))) xlabel("Frequency (\times\pi rad/sample)") ylabel("Magnitude (dB)") ylim([-40 40]) grid
Input Arguments
ctf
— Cascade of numerator filter coefficients
matrix
Cascade of numerator filter coefficients, specified as a matrix. The number of rows
of ctf
equals L, the number of filter sections
in the cascade. The number of columns of ctf
equals N + 1, where N is the section order.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Complex Number Support: Yes
g
— Scale values
scalar | vector
Scale values, specified as a scalar or a vector with L + 1 elements, where L is the number of filter sections in the cascade.
If
g
is a scalar,scaleFilterSections
applies the value uniformly to all the cascade filter sections.If
g
is a vector,scaleFilterSections
applies each of the first L scale values to the corresponding filter section and the last scale value uniformly to all the filter sections.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Output Arguments
ctfg
— Scaled numerator filter coefficients
matrix
Scaled numerator filter coefficients, returned as a matrix.
ctfg
has the same size as ctf
.
Version History
Introduced in R2023b
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)