I have an array of elements and I want to see their indices inside another matrix
For example, for
A = [1 2 3] B = [1 2 3 4 5 3 4 5 1 2 3]
then an array of results
C = [1 2 3 6 9 10 11]
which give indices 1 2 3
Is there any function or short way to handle it?
source share