How do I find the location of the closest point in a mesh?

5 ビュー (過去 30 日間)
John Hart
John Hart 2017 年 5 月 9 日
コメント済み: Stephen23 2017 年 5 月 11 日
I have a mesh with x,y and z data. I have a point of known reference that is within the coordinate range of the mesh, however it does not sit perfectly within it. I want to find the location of the closest point in the mesh to the reference point. I have found the minimum difference value in the x and y direction by using
GCP1xdiff=GCP1x-xi
GCP1xmin=min(abs(GCP1xdiff(ind,:)))
I now want to find the location of the nearest point within the mesh, I have tried something like
find(abs(min(GCP1x-xi))
But this does not work, any suggestions?
Many thanks!
  1 件のコメント
Stephen23
Stephen23 2017 年 5 月 11 日
Can you please clarify what _"the location of the nearest point within the mesh" is: do you want the nearest mesh intersection/node, or any point that lies along one of the x/y lines of the mesh?

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2017 年 5 月 9 日
編集済み: Jan 2017 年 5 月 9 日
Do you mean:
[GCP1xmin, Index] = min(abs(GCP1xdiff(ind,:)))
?
But what is "ind"?
  1 件のコメント
John Hart
John Hart 2017 年 5 月 11 日
Ind is the number of columns in the dataset. So this allows all of the rows and columns in GCP1Xdiff to be looked at.
Sorry for the slow response

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by