% corrx_example5.m
% Similar to "corrx_example1.m" except for low-pass filter
clear all;
rand('seed', 1000); 
y = 10 * randn(1, 1001); 
window_size = 200;  
h = ones(1, window_size)/window_size;
x = conv(y, h);
x = x(1: 1001);
sample_period = 0.001;
t = 0: 0.001 : 1; 
[t1, R] = corb(x, x, 1000) ; 
subplot(2, 1, 1); 
plot(t,x);
xlabel('TIME'); ylabel('X');
subplot(2, 1, 2); 
plot(t1,R);
xlabel('LAG'); ylabel('RX');