代码:
% x = [-0.9, 0.81]; [y, L, B] = QCoeff(x, 3) % Unquantized parameters r = 0.9; theta = pi/3; a1 = -2*r*cos(theta); a2 = r*r; p1 = r*exp(j*theta); p2 = p1‘; % Quantized parameters: N = 3; [ahat, L, B] = QCoeff([a1, a2], 3); rhat = sqrt(ahat(2)); thetahat = acos(-ahat(1)/(2*rhat)); p1hat = rhat*exp(j*thetahat); p2 = p1‘; % Changes in pole locations Dp1 = abs(p1 - p1hat) Dp1 = 0.0344
运行结果:
时间: 2024-10-31 07:55:27