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

📄 ex9_5.m

📁 Advanced Engineering Mathematics using MATLAB by Harman, Dabney, Richert,书中全部源码
💻 M
字号:
% EX9_5.M Compute the spectrum of a signal saved%   in file CLEX95.MAT. (Created by CLEX95DT.M) The data are:%   N   samples of the |FFT| are plotted%   Ts   sampling interval in seconds%   t   time points%   ft  function f(t)% Calls clfftf to compute DFTload clex95.mat                    % Load N,Ts,t,ftfs=1/(N*Ts);                       % Frequency spacing	fhertz=fs*linspace(-N/2,N/2-1,N);  % Create frequency axis[FT,FTmag,FTarg]=clfftf(ft,N,Ts);  % Compute DFT% Plot f(t) and DFT subplot(2,1,1), plot(t,ft)         % Time functiontitle('Signal')xlabel('Time in seconds'), ylabel('f(t)')subplot(2,1,2),plot(fhertz, FTmag) % Spectrumxlabel('Frequency in hertz')ylabel('Spectrum')%% Modify the script to use other data files. The M-file%  that created the data file is CLEX95DT.M

⌨️ 快捷键说明

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