You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
210 B
Matlab

function [ lambda ] = cp_corr( x, theta, N, L, rho)
l0=sum(x(theta:theta+L-1).*conj(x(theta+N:theta+L+N-1)));
l1=0;
for i=theta:theta+L-1
l1=l1+abs(x(i))^2+abs(x(i+N))^2;
end
lambda=l0;%2*abs(l0)-rho*l1;