How do I find the location of the closest point in a mesh?
조회 수: 4 (최근 30일)
이전 댓글 표시
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
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?
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!