我这有个初程序不知对你有没有用 i{%z
clear f\U? :83
dt=; %时间间隔 I,?Fqg'sq
s= %信号数组 9n06n$F
len=128; l}U~I
3}).
F=2*pi*(0:len/2)/len/dt; [)C)p*!Y)
fs=fft(s,len); FZeN,
p=fs.*conj(fs) LAu+{'O\
p=p(1:len/2+1); 3fbD"gL
plot(F,p) #QJ4o_
ylabel('power spectrum density ') H]T2$'U6
xlabel('sequence ') R#[QoyJ
title('03051171') Res"0Q
参数自已改吧