firtype
Type of linear phase FIR filter
Description
Examples
Types of Linear Phase Filters
Design two FIR filters using the window method, one of even order and the other of odd order. Determine their types and plot their impulse responses.
subplot(2,1,1) b = fir1(8,0.5); impz(b), title(['Type ' int2str(firtype(b))]) subplot(2,1,2) b = fir1(9,0.5); impz(b), title(['Type ' int2str(firtype(b))])
Design two equiripple Hilbert transformers, one of even order and the other of odd order. Determine their types and plot their impulse responses.
subplot(2,1,1) b = firpm(8,[0.2 0.8],[1 1],'hilbert'); impz(b), title(['Type ' int2str(firtype(b))]) subplot(2,1,2) b = firpm(9,[0.2 0.8],[1 1],'hilbert'); impz(b), title(['Type ' int2str(firtype(b))])
Types of FIR digitalFilter Objects
Use designfilt
to design the filters from the previous example. Display their types.
d1 = designfilt('lowpassfir','DesignMethod','window', ... 'FilterOrder',8,'CutoffFrequency',0.5); disp(['d1 is of type ' int2str(firtype(d1))])
d1 is of type 1
d2 = designfilt('lowpassfir','DesignMethod','window', ... 'FilterOrder',9,'CutoffFrequency',0.5); disp(['d2 is of type ' int2str(firtype(d2))])
d2 is of type 2
d3 = designfilt('hilbertfir','DesignMethod','equiripple', ... 'FilterOrder',8,'TransitionWidth',0.4); disp(['d3 is of type ' int2str(firtype(d3))])
d3 is of type 3
d4 = designfilt('hilbertfir','DesignMethod','equiripple', ... 'FilterOrder',9,'TransitionWidth',0.4); disp(['d4 is of type ' int2str(firtype(d4))])
d4 is of type 4
Input Arguments
b
— Filter coefficients
vector
Filter coefficients of the FIR filter, specified as a double- or single-precision real-valued row or column vector.
Data Types: double
| single
d
— FIR filter
digitalFilter
object
FIR filter, specified as a digitalFilter
object. Use
designfilt
to generate a
digital filter based on frequency-response specifications.
Output Arguments
t
— Filter type
1 | 2 | 3 | 4
Filter type, returned as either 1, 2, 3, or 4. Filter types are defined as follows:
Type 1 — Even-order symmetric coefficients
Type 2 — Odd-order symmetric coefficients
Type 3 — Even-order antisymmetric coefficients
Type 4 — Odd-order antisymmetric coefficients
Version History
Introduced in R2013a
See Also
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 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)