How to equate data from two arrays?

3 views (last 30 days)
Isuru on 20 Mar 2014
Answered: nl2605 on 20 Mar 2014
Say I had two arrays A and B which are not of same length. The array data in A is also present within the array data in B but B also has other data that are not relevant. I want to find the data of A in B and return the indexes of these data in B. Is there a way of extracting this?

Answers (1)

nl2605 on 20 Mar 2014
'ismember' is what you need.


Find more on Matrices and Arrays 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!