Indexing Logical Array Intersections
11 次查看(过去 30 天)
显示 更早的评论
row_max =
3×3 logical array
0 0 1
0 0 1
0 0 1
col_min =
3×3 logical array
1 1 1
0 0 0
0 0 0
I have these logical arrays. I want to find the intersection index of them where there must be the same element in the same index. In this example I would need (1,3), since it would be the same element and at the same index at col_min(1,3) and row_max(1,3). Thanks.
0 个评论
采纳的回答
Dyuman Joshi
2021-5-30
[r, c] = find((row_max&col_min)==1);
4 个评论
Dyuman Joshi
2021-5-30
I agree that it is not required, however it might be a useful point to note for OP, as a similar approach might be applied later.
更多回答(0 个)
另请参阅
类别
在 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!