Sine function in 2D

19 ビュー (過去 30 日間)
Sucheta
Sucheta 2022 年 12 月 16 日
コメント済み: Sucheta 2022 年 12 月 19 日
I have already used the simple plot command but how can pcolor and contour plot be used to plot sine and cosine function in 2D? Need help!

採用された回答

KSSV
KSSV 2022 年 12 月 16 日
x = linspace(0,2*pi) ;
y = x ;
[X,Y] = meshgrid(x,y) ;
Z = sin(X) ;
surf(X,Y,Z)
  1 件のコメント
Sucheta
Sucheta 2022 年 12 月 19 日
Thank you! Could you also tell me how the light and lighting function can be used for the same?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by