function L=lcv(h,A,k)

% LCV         LCV(H,A,K)

n=length(A);

M=A*ones(size(A'));

Y=(M-M')/h;

L2=sum(sum(feval(k,Y)))/(h*(n-1))-n*feval(k,0)/(h*(n-1));