I have two vectors and I need to find the index of the common elements between the two vectors, but the position of the indeces should be like the first array.
Here an example:
a=[7 10 33];
I would use setdiff like [C,ia] = setdiff(A,B,'stable'), but C has the same order of array A and I cannot swap A with B. In my case all the elements of B are always included in A.