Problem with fsurf (where is the controur?)

조회 수: 1 (최근 30일)
Rene Wells
Rene Wells 2019년 5월 17일
댓글: Walter Roberson 2019년 5월 18일
using:
f = @(x,y) (x^0.3)*(y^0.3)
fsurf(f,[0,10],'ShowContours','on')
but I do not seem to get the countour below the surface, only the surface. Why?

채택된 답변

Walter Roberson
Walter Roberson 2019년 5월 17일
When I try in R2019a, the contour is there, but you need to rotate the plot to see it as it is underneath the surface.
  댓글 수: 2
Rene Wells
Rene Wells 2019년 5월 17일
OK I see what you mean as I rotate with the mouse I can see the contour bel;ow teh surface. Thanks.
But how can I get to see both without rotating, i.e. by creating a gap between the surface and the contour? But how?
Walter Roberson
Walter Roberson 2019년 5월 18일
surface plots are not compatible with gaps.
You can draw a surface plot and contour3() on top of it. That would require that you create a grid of function values to contour3()
You could fsurf() and set the Alpha (transparency) of it fairly low so that you could see the contour lines underneath.
f = @(x,y) (x.^0.3).*(y.^0.3);
[X,Y] = meshgrid(linspace(0,10));
Z = f(X,Y);
surf(X, Y, Z, 'edgecolor', 'none')
alpha 0.5
hold on
contour(X, Y, Z);
hold off

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by