Defining coordinates and points in a 3D plot

14 vues (au cours des 30 derniers jours)
Breanna Elliott
Breanna Elliott le 2 Sep 2018
Commenté : Walter Roberson le 29 Nov 2018
How do I define the length of x (0 to 1m) and y (0 to .5m) with a grid of 101 by 51 points? This is a 3D plot
  1 commentaire
Walter Roberson
Walter Roberson le 29 Nov 2018
Please do not close questions that have an Answer.

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 2 Sep 2018
xv = linspace(0, 1, 101);
yv = linspace(0, 0.5, 51);
[X, Y] = ndgrid(xv, yv);
Z = sqrt(sin(X)) .* cos(Y-X).^2;
surf(X, Y, Z, 'edgecolor', 'none');

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by