sketch the graph of the function: f(x,y)= 1+2x^2+2y^2

33 vues (au cours des 30 derniers jours)
Ta Duc
Ta Duc le 2 Mai 2021
I'm not sure how to plot above equation. Can anyone help me?

Réponses (2)

Jan
Jan le 2 Mai 2021
fsurf(@(x,y) 1 + 2 * x.^2 + 2 * y.^2)
  2 commentaires
Ta Duc
Ta Duc le 3 Mai 2021
I don't think your answer is correct because it's different from the answer. Can u help me to do it again, tks a lot!
Jan
Jan le 3 Mai 2021
@Ta Duc: Where do you see a difference? Matlab crops the object at rectangluar limits of the axis, in your image the object is cropped at a specific z value. Both methods are valid ways to display the object.
Do you see, that the formulas are identical?

Connectez-vous pour commenter.


Carlos Guerrero García
Carlos Guerrero García le 10 Déc 2022
The usage of polar coordinates must be useful:
[rho,theta]=meshgrid(0:0.1:2,0:pi/60:2*pi);
x=rho.*cos(theta);
y=rho.*sin(theta);
z=1+2*x.^2+2*y.^2;
surf(x,y,z);
shading interp;
axis equal % for a nice view

Catégories

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

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by