Help in graph plotting
Show older comments
Given a function 𝑧(𝑥,𝑦)=10sin 𝑡.where 𝑡=√𝑥2+𝑦2.
Create a figure containing of twodifferent three-dimensional subplots (i.e. mesh and contour plots) of the function 𝑧(𝑥,𝑦)where both 𝑥 and 𝑦 are ranging from -10 to 10. For both subplots, label the axes and showthe color bar to identify the variation of z.
x=linspace(-10,10);
y=linspace(-10,10);
t=sqrt(x.^(2)+y.^(2));
Z = 10*sin(sqrt(x.^(2)+y.^(2)));
%graphing
figure(1)
mesh(Z);
xlabel('x')
ylabel('y')
zlabel('10 sin(t)')
figure(2)
contour3(Z);
xlabel('x')
ylabel('y')
zlabel('10 sin(t)')

What went wrong actually?
No graph were plotted when run
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh 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!
