필터 지우기
필터 지우기

In surface(x,y,z) command what is the value of z that make the white color. I mean is there a color code for surface of surf

조회 수: 1 (최근 30일)
In surface(x,y,z) command what is the value of z that make the white color. I mean is there a color code for surface of surf

채택된 답변

Steven Lord
Steven Lord 2022년 2월 7일
Many plotting functions interpret NaN in the data as "don't display anything."
[x, y, z] = peaks;
z(abs(z) < 1) = NaN; % Cut out everything between -1 and +1 on the Z axis
surface(x, y, z)
view(3)

추가 답변 (1개)

Cristian Garcia Milan
Cristian Garcia Milan 2022년 2월 7일
Yes, there is. You have to use
surface(X,Y,Z,C)
You have to set the colours as you want, for example:
C(Z==z0,:) = [255,255,255];

카테고리

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