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

조회 수: 13 (최근 30일)
Ta Duc
Ta Duc 2021년 5월 2일
답변: Carlos Guerrero García 2022년 12월 10일
I'm not sure how to plot above equation. Can anyone help me?

답변 (2개)

Jan
Jan 2021년 5월 2일
fsurf(@(x,y) 1 + 2 * x.^2 + 2 * y.^2)
  댓글 수: 2
Ta Duc
Ta Duc 2021년 5월 3일
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 2021년 5월 3일
@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?

댓글을 달려면 로그인하십시오.


Carlos Guerrero García
Carlos Guerrero García 2022년 12월 10일
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

카테고리

Help CenterFile Exchange에서 Graphics에 대해 자세히 알아보기

태그

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by