Having problem with 'intersect' function, not giving the obvious result
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone, I am using intersect function to compare different arrays and find find out the common rows between them. But I am facing a problem with its result. When I am comparing an array 'H' which is of size 155010x3 double with itself i.e. 'H' it is giving the result as 25896x3 double. However both of them are same so the result should be actual size of 'H' i.e 155010x3 double.
Picture is also attached below.
Anyone please guide me about this.
1 个评论
采纳的回答
the cyclist
2016-6-21
编辑:the cyclist
2016-6-21
According to the documentation, intersect reports only the unique rows, without repetition.
You may be able to glean more info from the other output arguments ...
[HH,ia,ib] = intersect(H,H,'rows')
which will indicate which rows of the input matrices were included in the intersection.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!