indexin
indexin(a, b)
Returns a vector containing the highest index in b
for each value in a
that is a member of b
. The output vector contains 0 wherever a
is not a member of b
.
Examples
julia> foo = [2, 5, 7, 5, 2, -1];
julia> bar = [2, 5, 4];
julia> indexin(bar, foo)
4
5
0
See Also
User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.