%% Allpass Filters
% Create an allpass filter and verify that the frequency response is allpass.

b = [1/3 1/4 1/5 1];
a = fliplr(b); 
flag = isallpass(b,a)
fvtool(b,a)

%
% Create a lattice allpass filter and verify that the filter is allpass.

k = [1/2 1/3 1/4 1/5];
[b,a] = latc2tf(k,'allpass');
flag_isallpass = isallpass(b,a)
fvtool(b,a)

% Copyright 2015 The MathWorks, Inc.