function ub=ubar(u,i,j);
ub=ones(u)*nan;
ub(i,j)=(u(i,j-1)+u(i,j)+u(i,j+1))/3;
