what's wrong with my 3d plot?
이전 댓글 표시

Hello everyone, I want to plot a 3d plot of the function z=2*X.^2-3*(X.*Y)+4*Y.^2 My code is the following: [X,Y]=meshgrid(-2:0.1:2); z=2*X.^2-3*(X.*Y)+4*Y.^2 surf(X,Y,z)
However when the plot appears the z axis is going up to 35 which shouldn't be correct since maximum value of z whould be for X=-2 and Y=2 which gives Z=12. What am I doing wrong?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!