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

📄 cpole2t.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
function  y = cpole2t(cp,res,t)%        Performs inverse Laplace transform for two complex %        conjugate poles and generates a time function. %Inputs: cp - complex pole, having POSITIVE imaginary part%        res - residue at the complex pole%        t - time vector%Output: y - time response vector% %        The response is computed as %        y(t) = 2 K exp(a*t) cos(omega*t + phi)%          where res = K exp(j phi), cp = a + j omega%%%%%%%%%%%%%%%%%%% cpole2t.m %%%%%%%%%%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%a = real(cp);omega = imag(cp);K = abs(res);phi = angle(res);y = 0*t;for n=1:length(t),   y(n) = 2*K*exp(a*t(n))*cos(omega*t(n)+phi);end%----- remove any very small imaginary partsy = real(y);%%%%%%%%%%

⌨️ 快捷键说明

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