Finding row values given a position.
10 次查看(过去 30 天)
显示 更早的评论
After using the "find" function to get the position of a value in a matrix, how do I retreive the values in the corrosponding row?
1 个评论
采纳的回答
Mathieu NOE
2022-3-25
hello
see example below :
use find with linear indices output (see the doc)
A = randn(5,3)
ind = find(A>0 & A<1)
B = A(ind)
2 个评论
Rik
2022-3-25
I interpreted the question a bit differently:
A = randn(5,3)
[r,c]=find(A>0.7)
B = A(unique(r),:)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!