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 日

1 投票

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 件)

カテゴリ

ヘルプ センター および File Exchange で Contour Plots についてさらに検索

製品

リリース

R2022a

質問済み:

2022 年 12 月 16 日

コメント済み:

2022 年 12 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by