%                covar.m
%                          for computing covariance matrix, and function
%                         needs u,x,y
%u=um2(:,1);
a=1:5:length(u);
xdif=x(a)*ones(a);
xdif=xdif'-xdif;
ydif=y(a)*ones(a);
ydif=ydif'-ydif;
ucov=u(a)*u(a)';
plot(sqrt(xdif.^2+ydif.^2),ucov,'x')
