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
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)
댓글 수: 0
추가 답변 (1개)
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];
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Colormaps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!