表面内部和外部颜色不同的绘图

时间:2014-11-14 10:01:05

标签: matlab plot

我将在matlab中绘制3D表面。我使用surf函数,但我希望以内表面有一种颜色而外部有另一种颜色的方式重新着色。我怎么能这样做?

A = [12 18 12
     23 47 27
     32 11 36
     48 47 39
     28 50 28]
figure, surf(A)

1 个答案:

答案 0 :(得分:3)

看看这是否有帮助,

 surf(A+.01,'FaceColor',[ 1  0  1]);
 hold on; 
 surf(A,'FaceColor',[ 0  0  1]);

给出,

enter image description here

enter image description here

我无法想出更好的主意!

这只是一个技巧,也许有一种方法可以为飞机的每一侧着色。

相关问题