我这有个初程序不知对你有没有用 ?_hKhn%K9
clear a?63 5*9K
dt=; %时间间隔 fV}: eEo|Y
s= %信号数组 1Z.
D3@
len=128; oRJ!J-Z]
F=2*pi*(0:len/2)/len/dt; kX0hRX
fs=fft(s,len); Nd5G-eYI
p=fs.*conj(fs) km%c0:
p=p(1:len/2+1); 2;!,:bFb
plot(F,p) \U(;%V
ylabel('power spectrum density ') >%x N?%
xlabel('sequence ') B;k3YOg
title('03051171') HLD8W8
参数自已改吧