Info
此问题已关闭。 请重新打开它进行编辑或回答。
help with contour plot
1 次查看(过去 30 天)
显示 更早的评论
Trying to plot.
The equation is:
A tip in polar coordinates:
And my code:
(The picture above is how it is supposed to look9
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!