0001
0002 function surfCustom(XX,YY,ZZ)
0003
0004 hh=surf(XX,YY,ZZ);
0005
0006 shading interp
0007 light
0008 lighting phong
0009
0010 axis('tight','square')
0011 xlabel('$x$','Interpreter','latex')
0012 ylabel('$y$','Interpreter','latex')
0013 zlabel('$f$','Interpreter','latex')
0014
0015
0016
0017 X=hh.XData;
0018 Y=hh.YData;
0019 Z=hh.ZData;
0020
0021 xlength = size(ZZ,2);
0022 ylength = size(ZZ,1);
0023 xnumlines = 10;
0024 ynumlines = 10;
0025 xspacing = round(xlength/xnumlines);
0026 yspacing = round(ylength/ynumlines);
0027
0028
0029 hold on
0030 for i = 1:yspacing:ylength
0031 mesh([X(i,:);X(i,:)], [Y(i,:);Y(i,:)], [Z(i,:);Z(i,:)],'EdgeColor',0.7.*[1,1,1]);
0032 end
0033
0034 for i = 1:xspacing:xlength
0035 mesh([X(:,i),X(:,i)], [Y(:,i),Y(:,i)], [Z(:,i),Z(:,i)],'EdgeColor',0.7.*[1,1,1]);
0036 end
0037 hold off
0038 end