看板 MATLAB 關於我們 聯絡資訊
小妹剛進研究所 以前都未學習過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://www.ptt.cc/bbs/MATLAB/M.1565677211.A.9C6.html
mp19990920: y = 2*cos(2*pi*Fs*t); 08/13 17:42