我这有个初程序不知对你有没有用 ^1\[hyZ!
clear s$3WJ'yr
dt=; %时间间隔 yhsbso,5 a
s= %信号数组 <)]j;Tl
len=128; (?vKe5
F=2*pi*(0:len/2)/len/dt; 1nZ7xCDK98
fs=fft(s,len); O<\h_
p=fs.*conj(fs) _(_U=
p=p(1:len/2+1); By;{Y[@rS
plot(F,p) cx_$`H
ylabel('power spectrum density ') $5r1Si)
xlabel('sequence ') V9\y*6#Y,
title('03051171') @xkI?vK6
参数自已改吧