How to find the row and column of elements where the value of A is the same as B
1 次查看(过去 30 天)
显示 更早的评论
A and B are matrices. Is there a function I'm missing?
0 个评论
采纳的回答
Alfonso Nieto-Castanon
2014-7-15
[i,j] = find(A==B);
2 个评论
Image Analyst
2014-7-15
Make sure A and B are integers or else see the FAQ: http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F
更多回答(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!