📄 ex2_9.m
字号:
%%%%%%%%%%%%%%%%%% 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -