%% Design a Fractional Delay Farrow Filter
% Farrow filters can be designed with the dfilt.farrowfd filter designer.

coeffs = [-1/6 1/2 -1/3 0;1/2 -1 -1/2 1;
-1/2 1/2 1 0;1/6 0 -1/6 0];
farrow = dfilt.farrowfd(0.5, coeffs);

%
% Design a cubic fractional delay filter with the Lagrange method.

fdelay = .2; % Fractional delay
d = fdesign.fracdelay(fdelay,'N',3);
cubicfarrow = design(d, 'lagrange', 'FilterStructure', 'farrowfd');
fvtool(cubicfarrow, 'Analysis', 'grpdelay');

% For more information about fractional delay filter implementations, see the "Fractional Delay Filters Using Farrow Structures" example,  farrowdemo.
% Copyright 2012 The MathWorks, Inc.