www.pudn.com > cyclostationary_toolbox.rar > ex6.m, change:2007-10-17,size:751b


clear; 
clc; 
% t=0:1/600:1023/600; 
% A=1;B=1;fb=7;fa=100; 
% x=A*(1+B*cos(2*pi*fb.*t)).*cos(2*pi*fa.*t); 
% figure(1) 
% plot(t,x) 
% alpha=2*pi/300; 
load('E:\169.mat');  %%读取数据 
% speed=1796;    %motor rotational speed(rpm) 
sig1=X169_DE_time'; 
ln=length(sig1); 
n=1000; 
t=0:1/12000:(n-1)/12000; 
figure(1) 
plot(t,sig1(1:n)) 
xlabel('\fontsize{9}\fontname{标楷体}时间/s');ylabel('\fontsize{9}\fontname{标楷体}幅值/um'); 
max_tau=0; 
alpha=2*pi/12000; 
R=cyclic_autocorrelation(sig1(1:n),alpha,max_tau); 
y=1000*R.*conj(R); 
% ff=600*(0:1023)/512; 
ff=0:1:6000-1; 
figure(2) 
% plot(ff(1:150)/(2*pi),y(1:150)); 
plot(ff(1:3000),y(1:3000)); 
xlabel('\fontsize{9}\fontname{标楷体}循环频率 /Hz');ylabel('\fontsize{9}{R_{x}}^{\alpha}(0) /um^2');