Use of C vector in trimesh function
显示 更早的评论
I'm having some difficulty understanding the use of the colour vector in the trimesh function. The function is used as follows:
trimesh(Tri,X,Y,Z,C)
Where Tri is a vector of index references to X, Y and Z where each row defines a triangle and X, Y and Z are the Cartesian coordinates of the vertices within the mesh.
If you leave the C vector out, my mesh is rendered without any problems. But I need to highlight specific parts of the mesh and so want to use the C vector to change the colour of some areas.
What I don't understand is the final input, C, which defines the edge colours. What format should it be in and what element of the mesh does each row of C refer to? I've tried using the standard MATLAB colour specification outlined here, but I get error messages telling me that it's not the correct format.
I'd appreciate it if anyone could explain this to me. Many thanks for your time!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!