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