% Assume that u is periodic N=400; t = 0:N-1; u = 1.*randn(N, 1); lags = [0:(N-1)/2];