Intersection(A,B) not working for date
Show older comments
I have A and B date vectors. I want to extract the common dates from both. I used:
[C,ia, ib]=intersection(A,B)
But it is giving me extremely few results than expected. Any solution?
Accepted Answer
More Answers (1)
Star Strider
on 2 Jun 2015
Since date vectors are row vectors, use the 'rows' option with intersect:
[C,ia, ib]=intersect(A,B,'rows');
Categories
Find more on Dates and Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!