我这有个初程序不知对你有没有用 * z{D}L-&
clear S6]D;c8GE
dt=; %时间间隔 (<8T*Xo
s= %信号数组 ?$r+#'asd(
len=128; !4*@H
F=2*pi*(0:len/2)/len/dt; 3&2,[G04
fs=fft(s,len); ^z)lEO
p=fs.*conj(fs) -B`;Sx
p=p(1:len/2+1); li; P,kg$
plot(F,p) &s]
s]V)
ylabel('power spectrum density ') ;>Z#1~8
xlabel('sequence ') !$_mWz
title('03051171') y{jv-&!xB
参数自已改吧