ex2_9.m
来自「离散控制系统设计的MATLAB 代码」· M 代码 · 共 40 行
M
40 行
%%%%%%%%%%%%%%%%%% Example 2.9 %%%%%%%%%%%%%%%%%%% 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ---- Poles and system stability ----%cleardisp('Example 2.9')numG = [3 1.8 1.08] % generate G(z) as TF objectdenG = [1 -1.25 0.495 -0.0035 -0.1862]G = tf(numG,denG,1) % sampling period = 1.0 sdisp('******>'), pause disp('Poles of G via pole command')xy2p(pole(G)); % poles of G via pole commanddisp('Poles of G via roots command')xy2p(roots(denG)); % poles of G via roots command %----------- poles and zeros ---------------figureucircle, hold on % show unit circle in z-planepzmap(G), hold off % draw pole-zero plottitle('Example 2.9')set_xo_size % make larger X's ans O'sdisp('Plotting pole-zero locations')disp('******>'), pause %----------- delta response ----------k = 0:80;y = impulse(G,k); % compute delta response of G(z)figurestem(k,y,'o:');grid % plot with dotted stems & o'sxlabel('Time (s)')ylabel('Amplitude')title('Impulse response for Example 2.9')disp('Plotting impulse response')%%%%%%%%%%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?