reinf2_1.m
来自「离散控制系统设计的MATLAB 代码」· M 代码 · 共 30 行
M
30 行
%%%%%%%%%%% Reinforcement Problem 2.1 %%%%%%%%%%%% 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- Third-order System ---%% Create G(z) as a TF object and determine some propertiescleardisp('Reinforcement Problem 2.1')numG = [1.25 -1.25 0.3] % enter transfer function numeratordenG = [1 -1.05 0.8 -0.1] % ...and denominator polynomials% Create G(z) as a discrete-time TF object with unspecified sampling periodG = tf(numG,denG,-1)get(G) % Show properties of the TF object[nn,dd] = tfdata(G,'v')%-- convert system from TF form to ZPK formGG = zpk(G) % ZPK object[zz,pp,kk] = zpkdata(GG,'v') % zeros, poles, & gain from ZPK object[mag_pp,theta_pp] = xy2p(pp) % show poles in polar formfigureucircle % draw the unit circlehold onpzmap(GG) % draw pole-zero plothold offset_xo_size % make larger X's and O'stext('Units','norm','Pos',[0.02,0.95],'Str','Reinforcement Problem 2.1')%%%%%%%%%%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?