www.pudn.com > cyclostationary_toolbox.rar > ex7.m, change:2007-10-15,size:314b


clear; 
clc; 
load('E:\248.mat');  %%ȡ 
% speed=1796;    %motor rotational speed(rpm) 
sig1=X248_DE_time'; 
n=1000; 
N=512; 
t=0:1/12000:(n-1)/12000; 
figure(3) 
plot(t,sig1(1:n)) 
x=sig1(1:n).*sig1(1:n); 
y=fft(x,N); 
Pyy=sqrt(y.*conj(y))/N; 
ff=12000*(0:N/2)/N; 
figure(4) 
plot(ff(1:N/2+1),Pyy(1:N/2+1));