find index of points in meshgrid under the line
조회 수: 1 (최근 30일)
이전 댓글 표시
I have 2D mesh grid of 501*2001. I want to get indices of values for the grid points in straight line to change the values of grid amplitude as shown in figure. ![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/215490/Capture.jpeg)
![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/215490/Capture.jpeg)
댓글 수: 0
답변 (1개)
KSSV
2019년 4월 23일
Read about knnsearch. You will get the the required/ nearest indices for the given line from the grid.
댓글 수: 4
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!