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

📄 ex5_3.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%%%%%%%%%% Example 5.3 %%%%%%%%%%%%%%%%%%%   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                 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   ---- Frequency components in a sampled signal ----%cleardisp('Example 5.3')fs = 10; Ts = 1/fs;             % sampling at 10 Hzt = [0:Ts:0.9]';                % time points from 0 to 0.9 sece_1 = sin(2*pi*t);              % 1-Hz signalN = 10;                         % length of datafr = fft(e_1)/N;                % sampled signal spectrumfr = imag(fr);                  % extract imaginary part              fr_paste = [fr; fr; fr];        % continue the spectrumfreq = [0:1:29]';               % extended frequency scale   figuredplot(freq,fr_paste);gridhold on, plot([0 30],[0 0]), hold offaxis([0 30 -0.6 0.6])xlabel('Frequency (Hz)')ylabel('Amplitude')text(2,0.58,'Imaginary Part of Spectral Coefficients')axis([0 30 -0.65 0.65])title('Frequency spectrum of the sample signal e_1^*(t) for Example 5.3')%%%%%%%%%%

⌨️ 快捷键说明

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