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!

 Respuesta aceptada

KSSV
KSSV el 16 de Dic. de 2022
x = linspace(0,2*pi) ;
y = x ;
[X,Y] = meshgrid(x,y) ;
Z = sin(X) ;
surf(X,Y,Z)

1 comentario

Sucheta
Sucheta el 19 de Dic. de 2022
Thank you! Could you also tell me how the light and lighting function can be used for the same?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Contour Plots en Centro de ayuda y File Exchange.

Productos

Versión

R2022a

Etiquetas

Preguntada:

el 16 de Dic. de 2022

Comentada:

el 19 de Dic. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by