%% Design a Lowpass Filter with Transition Band
% The following illustrates how to design a lowpass filter of order 225 with transition band.
% Create the frequency and amplitude vectors, f and a.

f = [0 0.25 0.3 1]
a = [1 1 0 0]

%
% Use firls to obtain the n+1 coefficients of the order n lowpass FIR filter.

b = firls(255,f,a);

%
% Show the impulse response of the filter

fvtool(b,'impulse')

% Copyright 2012 The MathWorks, Inc.