For the filter
See Sections J.5 and J.6 starting on page for listings of residuez, residued and related discussion.
B=[2 6 6 2]; A=[1 -2 1]; [r,p,f,m] = residued(B,A) % r = % 8 % 16 % % p = % 1 % 1 % % f = % 2 10 % % m = % 1 % 2