% minphase_part2.m
%
% The zeroes obtained in part 1 were edited so that those that were
% supposed to appear as double order on the circle, and were only
% approximately so, were exactly so.
%
% File hzeroes.txt defines the zeroes for the minimum phase filter
% realizing the specs. These zeroes are read in here and the minimum
% phase filter computed.
%
load hzeroes.txt
z=hzeroes(:,1)+i*hzeroes(:,2);
h=real(poly(z));
N=length(h);
figure
zplane(z)
title(['zeroes of minimum phase filter of length ',int2str(N)])
pause
% make gain = 1 at 0 frequency:
h=h/sum(h);
[f,H]=freqzdB(h,1,101,0.0,0.1);
figure
plot(f,H)
title(['passband of minimum phase filter of length ',int2str(N)])
pause
[f,H]=freqzdB(h,1,501,0.0,0.5);
figure
plot(f,H)
title(['frequency response of minimum phase filter of length ',int2str(N)])
