我这有个初程序不知对你有没有用 dwbY"t[9
clear PT@e),{~o9
dt=; %时间间隔 (<R\
s= %信号数组 #C;zS9(]B
len=128; |5B,cB_
F=2*pi*(0:len/2)/len/dt; ]n]uN~)9
fs=fft(s,len); KR+BuL+L
p=fs.*conj(fs) pebx#}]p-
p=p(1:len/2+1); LF)a"Sh
plot(F,p) -C-OG}XjI
ylabel('power spectrum density ') \P~rg~
xlabel('sequence ') !QR?\9`
title('03051171') T~~[a|bLa
参数自已改吧