Need help with 3-D plotting

13 ビュー (過去 30 日間)
Emmanuel Matata Bili Bili
Emmanuel Matata Bili Bili 2020 年 10 月 23 日
Hi guys,
I need help with the error below. I'm trying to create a few 3-D plots based on the description below. My code is included.
Given function f(x,y) = x^2 + y-sin(xy), draw 3-D graph of contour, plot3, mesh, surface on the intervals x [-2*pi,2*pi] and y[-2*pi; 2*pi].
Thanks in advance!
x =-2*pi,2*pi
y = -2*pi,2*pi
[X,Y] = meshgrid ([-2*pi,2*pi], [-2*pi,2*pi])
contour(X,Y,X.^2+Y.^2)
axis square 
>>Warning: Contour not rendered for constant ZData
> In contour (line 51)

採用された回答

madhan ravi
madhan ravi 2020 年 10 月 23 日
編集済み: madhan ravi 2020 年 10 月 23 日
[X, Y] = meshgrid(-2*pi : 0.01 : 2*pi);
  1 件のコメント
Emmanuel Matata Bili Bili
Emmanuel Matata Bili Bili 2020 年 10 月 23 日
Thanks!
That worked.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by