フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

help with contour plot

1 回表示 (過去 30 日間)
Hanna Sundling
Hanna Sundling 2020 年 4 月 29 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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
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
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 件のコメント
Hanna Sundling
Hanna Sundling 2020 年 4 月 29 日
I do not understand how I sholud change.
I tried writing Z1 = Z2.^2 an then surf(X,Y,Z1)
Walter Roberson
Walter Roberson 2020 年 4 月 29 日
surf() one thing. "hold on". surf() another thing that is mirror in Z.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by