ex2_3.m

来自「离散控制系统设计的MATLAB 代码」· M 代码 · 共 29 行

M
29
字号
%%%%%%%%%%%%%%%%%% Example 2.3 %%%%%%%%%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   ---- Partial-fraction and g(k) ----%cleardisp('Example 2.3')numG = [2 -2.2 0.56];                         % define numerator of G(z)denG = [1 -0.6728 0.0463 0.4860];             % define denominator of G(z)[rGoz,pGoz,otherGoz] = residue(numG,[denG 0]) % residues & poles of G(z)/zdisp('*****>'), pause%-------- convert poles & residues to polar form -------disp('polar form of the poles of G/z are:')xy2p(pGoz);           % magnitudes & arguments of the poles   disp('polar form of the residues of G/z are:')xy2p(rGoz);           % magnitudes & arguments of the residuesG  = tf(numG,denG,1)                          % G(z) as TF object with Ts = 1 s[y,k] = impulse(G);                           % compute unit delta responsestem(k,y,'filled')                            % plot responsegridxlabel('Time (s)')title('Example 2.3')%%%%%%%%%%

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?