Sine function in 2D

조회 수: 28 (최근 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 CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by