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

📄 mm2201.m

📁 《精通matlab7》“mastering matlab 7”的代码。
💻 M
字号:
% mm2201.m

N = 128;  % choose a power of 2 for speedt = linspace(0,3,N);  % time points for function evaluationf = 2*exp(-3*t);  % evaluate the function and minimize aliasing: f(3) ~ 0Ts = t(2) - t(1);  % the sampling periodWs = 2*pi/Ts;  % the sampling frequency in rad/secF = fft(f); % compute the fftFc=fftshift(F)*Ts;
W=Ws*(-N/2:(N/2)-1)/N;

Fa = 2./(3+j*W); % evaluate analytical Fourier transform
plot(W,abs(Fa),W,abs(Fc),'.') % generate plot, 'o' mark fft resultsxlabel('Frequency, Rad/s')ylabel('|F(\omega)|')title('Figure 22.1: Fourier Transform Approximation')

⌨️ 快捷键说明

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