필터 지우기
필터 지우기

problem with convhulln degenerate

조회 수: 1 (최근 30일)
teresa
teresa 2012년 3월 20일
댓글: Walter Roberson 2020년 9월 18일
Hi my name is noé alvarado I want to find de convex hull of the next point:
xyzw = [1 -1 -1.375 0;-0.5 -0.8 -0.2830 0;-1.3 0.7 0.217 0;1.5 1.3 1.74 0;0.6 0 0 0]
xyzw =
1.0000 -1.0000 -1.3750 0
-0.5000 -0.8000 -0.2830 0
-1.3000 0.7000 0.2170 0
1.5000 1.3000 1.7400 0
0.6000 0 0 0
tess = convhulln(xyzw)
however i have the error:
Error using ==> qhullmx The data is degenerate in at least one dimension - ND set of points lying in (N+1)D space.
Could yoyu help me?
thanks

답변 (4개)

Nshine
Nshine 2020년 1월 16일
xyzw = [1 -1 -1.375 0;-0.5 -0.8 -0.2830 0;-1.3 0.7 0.217 0;1.5 1.3 1.74 0;0.6 0 0 0]
convhulln(xyzw)
The error occurs because the last column is all zeros. If you delete the last column and try again:
xyzw(:,4) = [];
convhulln(xyzw)
you get the answer
ans =
1 4 3
4 2 3
2 1 3
1 2 4
ie: facet 1 is made by the triangle connecting vertex 1, 4 and 3, etc.

Image Analyst
Image Analyst 2012년 3월 20일
I'm not sure I understand. You have a 2D matrix. Why not use the 2D version of convex hull, convhull()?
And what is "the next point"? What were the prior points for that matter?
You can't have the convex hull of just a point - you need at least 3 points to give a meaningfull convex hull.
  댓글 수: 1
Nshine
Nshine 2020년 1월 16일
This is an old thread, but the the argument for convhulln, X is an m-by-n array (ie: 2D array) representing m points in n-D space, as can be read in the documentation:
help convhulln

댓글을 달려면 로그인하십시오.


ilPlus30
ilPlus30 2020년 1월 28일
편집: ilPlus30 2020년 1월 28일
Hi everybody,
even keeping the last column , you could try this way:
xyzw = [1 -1 -1.375 0;-0.5 -0.8 -0.2830 0;-1.3 0.7 0.217 0;1.5 1.3 1.74 0;0.6 0 0 0]
convhulln (xyzw, {'QJ'})
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 1월 28일
The last column of xyzw is all 0.
ilPlus30
ilPlus30 2020년 1월 28일
Sorry you're right, however in that way the last column could go on, for example it could be important not to delete it.

댓글을 달려면 로그인하십시오.


Shannu
Shannu 2020년 9월 18일
what id degeneracy of matrix
A=[-1 0 0 0
0 -1 0 0
0 0 -1 0
0 0 0 -1];
  댓글 수: 1
Walter Roberson
Walter Roberson 2020년 9월 18일
You have 4 points in a 4 dimensional space. In order to generate a convex hull, you need at least 5 points for a 4 dimensional space.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Bounding Regions에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by