cnyquist.m
来自「市面上电力系统的范例 直得收藏学习的ㄧ本书」· M 代码 · 共 22 行
M
22 行
function [re,im]=cnyquist(num,den,s)
% Hadi Saadat 1998
% [re, im] = cnyquist(num, den, s) calculate the nyquist response
% by mapping the nyquist path via the transfer function GH(s) into
% complex plane. num and den contain the polynomial coefficients
% in descending power. s is the complex row vector defined by the
% Nyquist path.
m=length(num); n=length(den); ls=length(s);
for k=1:ls
for j= 1:m
sm(j)=s(k)^(m-j);
end
for i=1:n
sn(i)=s(k)^(n-i);
end
nums=sm*num';
dens=sn*den';
ghs(k) =nums/dens;
end
re=real(ghs); im=imag(ghs); [re im];
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?