作者heizesun (RedSun)
看板MATLAB
标题[讨论] 关於FFT转换加频率的问题
时间Tue Aug 13 14:20:09 2019
小妹刚进研究所
以前都未学习过matlab
想请问各位高手
在做FFT转换时
如何加入频率
我想做60MHz
之前已经有在y里面乘过60M
但未成功
还请各位高手指导
附上程式码
Fs = 1000;
t = -1:1/Fs:1;
y = 2*cos(2*pi*t);
% Plot time domain
subplot(2,1,1);
plot(t, y, '.-');
title('time domain');
xlabel('Time');
ylabel('Amplitude');
axis tight
% Plot Frequency domain
subplot(2,1,2);
Y = fft(y);
stem(abs(Y) );
fftshift(stem(abs(Y)))
plot(t,Y,'.-'); grid on
xlabel('Frequency');
ylabel(' Amplitude ');
title(' Fourier transform in Frequency domain ')
-----
Sent from JPTT on my iPhone
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 110.26.193.53 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/MATLAB/M.1565677211.A.9C6.html
1F:→ mp19990920: y = 2*cos(2*pi*Fs*t); 08/13 17:42