我这有个初程序不知对你有没有用 9m~p0 ILh
clear *wB1,U{
dt=; %时间间隔 YGCL2Y
s= %信号数组 5taT5?n2
len=128; U#WF;q0L
F=2*pi*(0:len/2)/len/dt; {[?(9u7R
fs=fft(s,len); l)l^[2
p=fs.*conj(fs) 1NA.nw.
p=p(1:len/2+1); _.Uh)-yR
plot(F,p) ^ sLdAC
ylabel('power spectrum density ') X?qK0fS
xlabel('sequence ') QX'qyojxN
title('03051171') )
ahA[
参数自已改吧