代码:
function [As, Ac, r, v0] = invCCPP(b0, b1, a1, a2) % Determine the signal parameters Ac, As, r, v0 in terms of % the rational function parameters b0, b1, a1 and a2. % ---------------------------------------------------- % function [As, Ac, r, v0] = invCCPP(b0, b1, a1, a2) % % b0, b1 = numerator coefficient % a1, a2 = denominator coefficient % % x(n)=Ac*(r^n)*cos(pi*v0*n)*u(n) + As*(r^n)*sin(pi*v0*n)*u(n) % Ac = b0; r = sqrt(a2); v0 = acos(-a1/(2*r)) / pi; As = (b1-a1*b0/2) / (r*sin(v0*pi));