A = {'A'; 'E'; 'A'; 'F'};
B = {'A';'B';'C';'D';'E'; 'F'};
I am trying to get for each row an array of cells A, an index that matches that row in the array of cells B. Awill have duplicate values, Bwill not.
find(ismember(B, A) == 1)
exits
1
5
6
but i want to get
1
5
1
6
preferably in one insert. I can not use strcmp instead of ismember or as vectors of different sizes.
The vectors will actually contain date strings, and I need an index, not a logical index matrix, I'm interested in a number that cannot be used for indexing.
How should I do it?
source
share