Problem using Reducepatch command
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 11 de Mzo. de 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
el 12 de Mzo. de 2018
Guillaume
el 12 de Mzo. de 2018
Can you provide your W array, so we can investigate?
Basheer Alwaely
el 12 de Mzo. de 2018
Editada: Basheer Alwaely
el 12 de Mzo. de 2018
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!