How do I plot z = sin(xy) for its graph and contour map

14 views (last 30 days)
How do I plot z = sin(xy) for its graph and contour map

Accepted Answer

Walter Roberson
Walter Roberson on 5 Oct 2017
Edited: Walter Roberson on 5 Oct 2017
anglerange = linspace(-6*pi, 6*pi);
[x, y] = ndgrid(anglerange);
AT THIS POINT, INSERT THE CALCULATION FOR z.
z = ....
After that,
ax1 = subplot(2,2,1);
surf(ax1, x, y, z, 'edgecolor', 'none');
colormap(ax1, jet(256));
ax2 = subplot(2,2,[2 4]);
contour(ax2, x, y, z);
colormap(ax2, hsv(256));

More Answers (0)

Categories

Find more on Contour Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!