function y = farrow(x, P, mu) D = size(P); N = D(1); M = D(2); % Partial filter responses for pp=1:M, hp(pp, :) = filter(P(1:N, pp), 1, x); end; h = hp'; % Combine for k=1:length(x), y(k) = horner(h(k,:), mu); end; function y = horner(a,x) % Input a is the polynomial coefficient vector, x the value to be evaluated at. % The output y is the evaluated polynomial and b the divided coefficient vector. b(1) = a(1); for i = 2:length(a) b(i) = a(i)+x*b(i-1); end y = b(length(a)); b = b(1:length(b)-1);