polystab.m
来自「matlabDigitalSigalProcess内有文件若干」· M 代码 · 共 24 行
M
24 行
function b = polystab(a);
%POLYSTAB Polynomial stabilization.
% POLYSTAB(A), where A is a vector of polynomial coefficients,
% stabilizes the polynomial with respect to the unit circle;
% roots whose magnitudes are greater than one are reflected
% inside the unit circle.
% Author(s): J.N. Little,7-25-89, handles roots at zero
% Copyright (c) 1988-98 by The MathWorks, Inc.
% $Revision: 1.9 $ $Date: 1997/11/26 20:13:41 $
if length(a) == 1, b = a; return, end
v = roots(a); i = find(v~=0);
vs = 0.5*(sign(abs(v(i))-1)+1);
v(i) = (1-vs).*v(i) + vs./conj(v(i));
ind = find(a~=0);
b = a(ind(1))*poly(v);
% Return only real coefficients if input was real:
if ~any(imag(a))
b = real(b);
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?