find index of points in meshgrid under the line
3 次查看(过去 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.
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!