ismember() returning without unique indexing
1 view (last 30 days)
Show older comments
I want to get a result from ismember function such that
a =[{'aa'};{'bb'};{'cc'};{'dd'};{'ee'}];
b = [{'bb'};{'bb'};{'dd'};{'dd'};{'dd'};{'dd'}];
idx = find(ismember(a,b) == 1);
then idx = [2 4];
however, I want to get the results like idx = [2 2 4 4 4 4];
so, the frequency of cell array in b is conserved.
Would please somebody help me?
Thanks.
justin
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Cell 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!