📄 display_pz.m
字号:
function display_pz(S)% displays poles & zeros as two column array%% syntax: display_pz(S)%% input: S is any ss-system in packed form% output: PZ is an N x 2 array, with poles in first column% and zeros + NaNs as required in 2nd column%%%%%%%%%%%%%%%%% display_pz.m %%%%%%%%%%%%%%%%%%% Discrete-Time Control Problems using %% MATLAB and the Control System Toolbox %% by J.H. Chow, D.K. Frederick, & N.W. Chbat %% Brooks/Cole Publishing Company %% September 2002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%---- find poles and sort by real part, rightmost firstpp = eig(unpack_ss(S,'a'));[ppp,ii] = sort(real(pp));poles_S = pp(ii(length(ii):-1:1));%---- find zeros and sort by real part, rightmost firstzz = tzero(S);[zzz,ii] = sort(real(zz));zeros_S = zz(ii(length(ii):-1:1));pz = [poles_S Inf*ones(length(pp),1)... [zeros_S; NaN*ones(length(pp)-length(zz),1)]];disp(' ')disp(' Poles Zeros')disp('----------------------------------------------------')disp(pz)if poles_S(1) > 0, disp(' ') disp('**** RHP pole ==> unstable system ****')end%%%%%%%%%%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -