The data is u. For example u1 to u1500. And when a=1, I will get sigma(1)=u1*u(1+1)+u(2)*u(2+1)+...u(600)*u(600+1), and then a=2, I will get sigma(2)=u2*u(2+2)+u(3)*u(3+2)+...u(600)*u(600+2). ... a=600, sigma(600)=u600*u(600+600)
conv(u,u) would be for sum(u(t)*u(h-t)) rather than for sum(u(t)*u(t+h)) . You could deal with the - by using conv(u, fliplr(u)) to effectively get sum(u(t)*u(t-h)) but at the moment I do not see how to use conv for t+h
Y =circshift(A,K)circularly shifts the elements in arrayAbyKpositions. IfKis an integer, thencircshiftshifts along the first dimension ofAwhose size does not equal 1. If K is a vector of integers, then each element of K indicates the shift amount in the corresponding dimension of A.
I don't think you have 600 dimensions to your u .
If you did not get an error when you did the xcorr() then that implies that u and y must both have been vectors.
The example in doc xcorr for Cross-Correlation of Two Vectors shows a vector of length 16 correlated with a modified version of itself. The output is length 31, reflecting a lag up to (16-1) before, and a lag up to (16-1) after, for a total of (16-1) + 1 + (16-1) = 2*16-1 .
Therefore for a vector of length 600, you should expect a length of 2*600-1 = 1199 for the output.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.