버전 (3.06 KB) 작성자: John D'Errico
Efficient test for points inside a convex hull in n dimensions
다운로드 수: 11.1K
업데이트 날짜: 2012/9/6

라이선스 보기

Testing if a point is inside a convex hull can be done in a variety of ways. Inhull converts the problem into a dot product. If not supplied, it also computes the convex hull too. Inhull also attempts to avoid memory problems, doing the computation in smaller blocks when appropriate.

Here is a comparison of inhull to tsearchn:
n = 500;
m = 100;
p = 5;
xyz = rand(m,p);
testpts = rand(n,p)-.1;

tess = delaunayn(xyz);
in0 = ~isnan(tsearchn(xyz,tess,testpts));
in1 = inhull(testpts,xyz);

tsearchn: Elapsed time is 0.813646 seconds.
inhull: Elapsed time is 0.242993 seconds.

인용 양식

John D'Errico (2024). Inhull (, MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14SP1
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
Help CenterMATLAB Answers에서 Bounding Regions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보

minor changes for a tiny speed boost

Repaired example in the help