3d dimensional surface
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
I'm trying to plot a 3d dimensional surface. The function given is
The code below is the one I'm using.
v = [-2:0.1:2];
w = [-2:0.1:2];
[X,Y] = meshgrid(v,w);
Z = 6*X^2-4*X^2*Y^2;
figure(3);
surf(X,Y,Z)
And this is the output in MATLAB:

Now when I do this in Wolfram alpha i'm getting a much smoother surface. So I'm wondering what I am doing wrong: https://www.wolframalpha.com/input/?i=3d+plot+6x%5E2-4x%5E2y%5E2
댓글 수: 0
답변 (1개)
G A
2019년 5월 12일
v = [-2:0.1:2];
w = [-2:0.1:2];
[X,Y] = meshgrid(v,w);
Z = 6*X.^2-4*X.^2.*Y.^2;
figure(3);
surf(X,Y,Z)
댓글 수: 4
Biha Dirks
2019년 5월 12일
The point means element by element operation between arrays and matrices.
Biha Dirks
2019년 5월 24일
G A
2019년 5월 24일
Not the same in which way? 3D plot on Wolfram Alpha has different limits for X and Y than those of yours given by v and w.
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!