To find the index of array using part of data but retaining actual indexing pattern

3 ビュー (過去 30 日間)
sam l
sam l 2020 年 8 月 31 日
コメント済み: sam l 2020 年 9 月 1 日
Hi
I am trying to create a index array for all points inside a convex hull shape , since the ponts array is too big - lot time is spent.
in = in_polyhedron(tri, xyz3D)
I am trying to search on the relavent index1 only, to save runtime.
in = in_polyhedron(tri, xyz3D(index1));
I cannot use a temperory array for xyz3D(index1) as I need to usethe xyz3D for doing interpolation and isovalue isosurface for 3D values. So the in - index array should get the same size as xyz3D array.
Could you tell me how to do in_polyhedron so that 'in' get back the origanl indexing - without having to search all points in xyz3D.
I tried using : xyz3D{index1}(in)= 1 , for points search results... but donot works

採用された回答

Matt J
Matt J 2020 年 9 月 1 日
in(index1) = in_polyhedron(tri, xyz3D(index1));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by