Problem using Reducepatch command
Show older comments
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 Comments
Walter Roberson
on 11 Mar 2018
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
on 12 Mar 2018
Guillaume
on 12 Mar 2018
Can you provide your W array, so we can investigate?
Basheer Alwaely
on 12 Mar 2018
Edited: Basheer Alwaely
on 12 Mar 2018
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!