www.gusucode.com > signal 案例源码程序 matlab代码 > signal/TypesOfLinearPhaseFiltersExample.m
%% 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. % Copyright 2015 The MathWorks, Inc. %% 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))])