t = 0:1/2048:1-1/2048; x = 10sin(2pi64t) + sin(2pi250t) + 20sin(2pi256t) + 3sin(2pi260t) + 10sin(2pi512*t); y = fft(x); f = 0:2048/length(x):2048-2048/length(x); plot(f,abs(y)); xlabel('Frequency (Hz)'); ylabel('Amplitude'); title('Frequency Spectrum of Signal x'); xlim([0 600]);

MATLAB Code for Signal Sampling and Frequency Spectrum Analysis

原文地址: https://www.cveoy.top/t/topic/ohdX 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录