⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reinf2_14.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%%% Reinforcement Problem 2.14 %%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- Response to one cycle of a sine wave ---%cleardisp('Reinforcement Problem 2.14')numG = [0.3 0.4 0.5];                  % numerator of G(z)denG = [1 -1.3 0.455 0.0628 -0.037];   % denominator of G(z)Ts = 0.2                               % sampling periodG = tf(numG,denG,Ts)                   % create TF object G(z)dtime = [0:Ts:5]';                     % discrete time samples%---- input u2 ----u2 = 0*dtime;i1 = min(find(dtime>=2));for i=1:i1,  u2(i)=2*sin(pi*dtime(i));endy = lsim(G,u2,dtime);                  % compute response due to input ustem(dtime,y,'filled');grid            % plot response of G(z) due to uhold onplot(dtime,u2,'o')                     % plot inputhold offtext(2.4,0.6,'output')                 % add labels to plottext(0.9,-1.4,'input')title('Reinforcement Problem 2.14')%%%%%%%%%%

⌨️ 快捷键说明

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