필터 지우기
필터 지우기

How to plot for this figure?

조회 수: 2 (최근 30일)
soe min aung
soe min aung 2021년 2월 11일
댓글: Star Strider 2021년 2월 11일
x = -10:1:10;
y = linspace(-10,10);
[X,Y] = meshgrid(x,y);
f = cos(2*pi*X).*cos(2*pi*Y);
surf(X,Y,f)

채택된 답변

Star Strider
Star Strider 2021년 2월 11일
Define the ‘x’ and ‘y’ vectors differently, then reduce the number of cycles in each direction. The grid lines on the surfaces are more of a callenge.
Experiment with this:
x = linspace(-10,10);
y = linspace(-10,10);
[X,Y] = meshgrid(x,y);
f = cos(2*pi*X/6).*cos(2*pi*Y/6);
surf(X,Y,f, 'EdgeColor','none')
hold on
idxv = 1:4:numel(x); % Index Vector For Grid Lines Plot
surf(X(idxv,idxv), Y(idxv,idxv), f(idxv,idxv), 'FaceAlpha',0, 'LineWidth',1.5)
hold off
.
  댓글 수: 2
soe min aung
soe min aung 2021년 2월 11일
Thank you so much sir.
Star Strider
Star Strider 2021년 2월 11일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by