JuliaLang/julia — pull request #3269 by wlbksy (2013-06-02 12:24:11+00:00)
Title: RFC: add ``locateat``, which is similar to Matlab's ``ismember``

Add a function ``locateat{T}(a::AbstractArray{T}, b::AbstractArray{T})`` , which is similar to Matlab's ``ismember``.

It 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``.

```
julia> locateat([2 3 4],[2 9 6 4])
3-element Int32 Array:
1
0
4

julia> locateat(["a";"b"],["a" "b";"c" "d"])
2-element Int32 Array:
1
3
```