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

📄 ex5_2.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%%%%%%%%%% Example 5.2 %%%%%%%%%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   ---- Aliasing in the time domain ----%cleardisp('Example 5.2')fs = 10, Ts = 1/fs              % sampling at 10 Hzt = [0:Ts:1]';                  % time points from 0 to 1 sece_1 = sin(2*pi*t);              % 1 Hz signale_2 = sin(18*pi*t+pi);          % 9 Hz signale_3 = sin(22*pi*t);             % 11 Hz signal%--------------- plot three sampled signals ---------figuredplot(t,e_1);grid               % plot the sampled 1 Hz signal hold ondplot(t,e_2)                    % plot the sampled 9 Hz signal dplot(t,e_3)                    % plot the sampled 11 Hz signal hold offxlabel('Time (s)')ylabel('Amplitude')title('Sampled signals e_1^*(t),e_2^*(t),e_3^*(t) for Example 5.2')%--------------- plot three continuous-time signals ---------tt = [0:0.01:1]';               % consider tt as continuous timefigureplot(tt,sin(2*pi*tt),'-');grid;          % solid curve   hold on   plot(tt,sin(18*pi*tt+pi),'--')           % dashed curveplot(tt,sin(22*pi*tt),'-.')              % dash-dot curveplot(t,e_1,'*')                          % plot sample valueshold offxlabel('Time (s)')ylabel('Amplitude')title('Continuous-time signals e_1(t), e_2(t), e_3(t) for Example 5.2')%%%%%%%%%%

⌨️ 快捷键说明

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