%% Add Title and Axis Labels and Format Ticks
% For x and y from -2\pi to 2\pi, plot the 3-D surface y\sin(x) - x\cos(y). Add a title and axis labels and display the axes outline.

fsurf(@(x,y) y.*sin(x)-x.*cos(y),[-2*pi 2*pi])
title('ysin(x) - xcos(y) for x and y in [-2\pi,2\pi]')
xlabel('x');
ylabel('y');
zlabel('z');
box on

%
% Set the x-axis tick values and associated labels using the XTickLabel and XTick properties of axes object. Access the axes object using gca. Similarly, set the y-axis tick values and associated labels.

ax = gca;
ax.XTick = -2*pi:pi/2:2*pi;
ax.XTickLabel = {'-2\pi','-3\pi/2','-\pi','-\pi/2','0',...
    '\pi/2','\pi','3\pi/2','2\pi'};

ax.YTick = -2*pi:pi/2:2*pi;
ax.YTickLabel = {'-2\pi','-3\pi/2','-\pi','-\pi/2','0',...
    '\pi/2','\pi','3\pi/2','2\pi'};

% Copyright 2014 The MathWorks, Inc.