Sine function in 2D

12 vues (au cours des 30 derniers jours)
Sucheta
Sucheta le 16 Déc 2022
Commenté : Sucheta le 19 Déc 2022
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!

Réponse acceptée

KSSV
KSSV le 16 Déc 2022
x = linspace(0,2*pi) ;
y = x ;
[X,Y] = meshgrid(x,y) ;
Z = sin(X) ;
surf(X,Y,Z)
  1 commentaire
Sucheta
Sucheta le 19 Déc 2022
Thank you! Could you also tell me how the light and lighting function can be used for the same?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Contour Plots dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by