Problem using Reducepatch command
显示 更早的评论
Hi,
For a given W (n,3), where W contains the x,y,z coordinates of n-nodes.
tri=delaunay(W(:,1),W(:,2));
G = trisurf(tri,W(:,1),W(:,2),W(:,3)); % to convert x,y,z into patch.
I used patch G, where
FaceColor: 'flat'
FaceAlpha: 1
EdgeColor: [0 0 0]
LineStyle: '-'
Faces: [380x3 double]
Vertices: [200x3 double],
and the command is :
reducepatch(G,0.8)
I got a problem with the reducepatch command
"Warning: Error creating or updating Patch Error in value of property
FaceVertexCData... Number of colors must equal number of vertices or faces".
Any idea? how to solve it? .... many thanks.
4 个评论
Walter Roberson
2018-3-11
That sounds like a bug.
I would look for the possibility that the data you are passing in contains NaN or Inf, and I would also look for the possibility that you are reducing to so few faces that the computation is degenerate.
Basheer Alwaely
2018-3-12
Guillaume
2018-3-12
Can you provide your W array, so we can investigate?
Basheer Alwaely
2018-3-12
编辑:Basheer Alwaely
2018-3-12
采纳的回答
更多回答(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!