function y=avg2(x)            %avg2.m
  function z= mysum(x)
      z= sum(x) ;
  end
  function z=mylen(x)
      z= length(x) ;
  end
  y=mysum(x)/mylen(x);
end
