function y=avg3(x)          % avg3.m
  function z= mysum(x)
      z= sum(x) ;
      fprintf('You are in the nested funtion\n');
  end
  function z=mylen(x)
      z= length(x) ;
  end
  y=mysum(x)/mylen(x);
end
function z=mysum(x)
  z=sum(x);
  fprintf('You are in the subfunction\n');
end
