[讨论] 关于FFT转换加频率的问题

楼主: heizesun (RedSun)   2019-08-13 14:20:09
小妹刚进研究所
以前都未学习过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 ')
作者: mp19990920 (郝渴连)   2019-08-13 17:42:00
y = 2*cos(2*pi*Fs*t);

Links booklink

Contact Us: admin [ a t ] ucptt.com