You *could* use setdiff, it depends on what you're working with (e.g. a
range of integers)
In [24]: a = [1:10]
Out [24]: 10-element Array{Int64,1}:
1
2
3
4
5
6
7
8
9
10
In [25]: b = [2,6,9]
Out [25]: 3-element Array{Int64,1}:
2
6
9
In [26]: setdiff(1:10,findin(a,b))
Out [26]: 7-element Array{Int64,1}:
1
3
4
5
7
8
10
On Thu, Apr 10, 2014 at 1:40 PM, harven <[email protected]> wrote:
>
>
> Le jeudi 10 avril 2014 17:19:12 UTC+2, Tony Kelman a écrit :
>>
>> help> setdiff
>>
>>
> well, findin returns the positions of the elements, not the elements
> themselves.
> This is quite different.
>
> julia> findin("honolulu","ou")'
> 1x4 Array{Int64,2}:
> 2 4 6 8
>
> julia> intersect("honolulu","ou")'
> 1x4 Array{Char,2}:
> 'o' 'o' 'u' 'u' # not sure why they are returned twice.
>
> Thanks for the suggestion though.
>