Help in graph plotting
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

