Perhaps

setdiff(a, b)

or

a[indexin(a, b) .== 0]

I don't know which is faster, for small arrays it should not matter.

Best,

Tamas

On Mon, Feb 02 2015, paul analyst <[email protected]> wrote:

> How to make vector 'c' such that they are the values of the vector "a" but not
> in the vector "b"?
>
> (Excluding the value of b with a )
>
> julia> b=[1 2 5]
> 1x3 Array{Int64,2}:
>  1  2  5
>
> julia> a=[1:1:10]
> 10-element Array{Int64,1}:
>   1
>   2
>   3
>   4
>   5
>   6
>   7
>   8
>   9
>  10
>
> expected c: 3 4 6 7 8 9 10
>
> Paul

Reply via email to