% surfplot.m
function surfplot
  clear
  diary('surfplot_m.out')
  format compact
  disp('surfplot.m running')
  disp('test for surf meshgrid=')
  [a,b]=meshgrid(1:0.5:2,3:0.25:4); 
  disp('a')
  disp(a)
  disp('b')
  disp(b) 
  disp('end test meshgrid=')
  disp(' ')
  % [x,y]=meshgrid(1:0.5:10,1:20);
  [x,y]=meshgrid(1:0.25:6.5,1:0.5:15);
  disp('x')
  disp(x)
  disp('y')
  disp(y)
  z=sin(x)+cos(y);
  disp('z')
  disp(z)
  disp('subplot.m end printing')
  diary off
  % plot surface
  surf(x,y,z);

end % surfplot.m
