% windowlength-窗长度 0-1的系数,比如windowlength-0.5;采样频率1000,则窗长度为500 % Fs-采样频率 windowlength = windowlength*Fs; y = reshape(y,windowlength,[]); % 数据分段 s = fft(y); % 快速傅里叶变换 d = abs(s(1:windowlength/2,:));% 求绝对值 f_spectrum = 2/windowlength*d;...
采样率fs=1000太低,载波f=1500=3*(fs/2),正好欠采样了3倍。把fs改到5000试试。
% windowlength-窗长度 0-1的系数,比如windowlength-0.5;采样频率1000,则窗长度为500 % Fs-采样频率 windowlength = windowlength*Fs; y = reshape(y,windowlength,[]); % 数据分段 s = fft(y); % 快速傅里叶变换 d = abs(s(1:windowlength/2,:));% 求绝对值 f_spectrum = 2/windowlength*d;...