我这有个初程序不知对你有没有用 W3r?7!~
clear l.`u5D
dt=; %时间间隔 D-2.fjo9!
s= %信号数组 6sJw@OaJ
len=128; 20b<68h$:
F=2*pi*(0:len/2)/len/dt; qH>`}/,P
fs=fft(s,len); }lP;U$
p=fs.*conj(fs) -`+<{NHv\
p=p(1:len/2+1); 'OkGReKt
plot(F,p) BecPT
ylabel('power spectrum density ') xe4Oxo
xlabel('sequence ') lhH`dG D
title('03051171') +-<}+8G;
参数自已改吧