Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
help with contour plot
조회 수: 1 (최근 30일)
이전 댓글 표시
Trying to plot.
The equation is:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/288527/image.png)
A tip in polar coordinates:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/288528/image.png)
And my code:
(The picture above is how it is supposed to look9
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/288529/image.png)
댓글 수: 1
Walter Roberson
2020년 4월 29일
Note that volunteers are seldom interested in typing in code from pictures of code. Make it easier for the volunteers by providing actual code.
답변 (1개)
Walter Roberson
2020년 4월 29일
Your line with == computes whether each element of Z happens to have a particular and exact relationship to X and Y. Once it has done that computation of whether there is a match or not, your code then throws away that computation, having wasted time but otherwise not having done anything useful.
I would suggest to you,
Z2 = X.^2 + Y.^2 + 1;
surf(X, Y, Z2)
댓글 수: 4
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!