cpole2k.m

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

M
32
字号
function  y = cpole2k(cp,res,dtime)%        Performs inverse z transform for two complex %        conjugate poles and generates a discrete-time %        function. %Inputs: cp - complex pole, having POSITIVE imaginary part%        res - residue at the complex pole%        dtime - discrete-time vector [0 1 2...kmax]%Output: y - discrete-time response vector% %        The response is computed as %        y(t) = 2 * real part [res * cp^k]%               where k is the discrete-time variable%%%%%%%%%%%%%%%%%%% cpole2k.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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%- form the complex time function for one pole and %       take 2 * real part to get y(k)temp = 0*dtime;temp(1) = res;for kk = 2:length(dtime),   temp(kk) = temp(kk-1)*cp;endy = 2 * real(temp);%%%%%%%%%%

⌨️ 快捷键说明

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