%% L14_SOS %% ======== %% Script to illustrate second order sections, which can be imported in %% fdatool. %% %% Created : 31 Aug 2005 %% Modified : 31 Aug 2005 %% %% Copyright (c) 2005 Salman Durrani . %% ------------------------------------------------------------ clc clear all close all %% Define filter coefficients [See DSP Guide (pg 336)] %% Low pass Chebyshev filter (0.5% passband ripple: type I) %% fc = 0.5 b0 = 2.858110e-01; b1 = 5.716221e-01; b2 = 2.858110e-01; a1 = 5.423258e-02; a2 = -1.974768e-01; %% H(z) num=[b0 b1 b2]; den=[1 -a1 -a2]; %% Analyse filter fvtool(num,den) % axis([0 1 -40 0]) %% Create two second order sections SOS = [b0 b1 b2 1 -a1 -a2 b0 b1 b2 1 -a1 -a2]; %% Import into fdatool using "Import Filter From Workspace" fdatool