我这有个初程序不知对你有没有用 YiO3<}Uf
clear $4:~*IQ
dt=; %时间间隔 tB!|p 6
s= %信号数组 ? 9qAe
len=128; ?qIGQ/af&
F=2*pi*(0:len/2)/len/dt; 65t[vi*C
fs=fft(s,len); H<{*ub4'L*
p=fs.*conj(fs) r=|vad$
p=p(1:len/2+1); ,`+Bs&S 8
plot(F,p) lkyJ;}_**
ylabel('power spectrum density ') $ JuLAqq
xlabel('sequence ') "|\94
title('03051171') }R\B.2#M_@
参数自已改吧