Finding row values given a position.
4 ビュー (過去 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 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!