%% Design of a Differentiator
% An ideal differentiator has a frequency response given by D(\omega)=j\omega. Design a differentiator of order 30 that attenuates frequencies above 0.9\pi. Include a factor of \pi in the amplitude because the frequencies are normalized by \pi. Display the zero-phase response of the filter.

b = firls(30,[0 0.9],[0 0.9*pi],'differentiator');

fvtool(b,1,'MagnitudeDisplay','zero-phase')

% Copyright 2015 The MathWorks, Inc.