Q:

Julia: getting subarray with multiple Boolean comparisons

How can we do the following Matlab code in Julia?
A=rand(4); 
A(:,A(1,:)>0.7)

I've tried:
A=rand(4,4);
A[:,A[1,:].>0.7]

Which results in: ERROR: getindex has no method matching getindex(::Array{Float64,2}, ::UnitRange{Int64}, ::BitArray{2})

A:

** EDIT **
Julia has gone through many changes in 3.5 years and now the OP's question is moot.  That style of array indexing now works.
See the current Julia Docs on Array Indexing for the full list of methods.
** Original, for the History Books **
In Julia, Arrayindexing needs to be done with a Vector (here with a boolean vector).
One way to accomplish what you want is to use the vec function:
julia> A = rand(4,4)
4x4 Array{Float64,2}:
 0.0253057  0.748903  0.633581  0.796249
 0.25894    0.330299  0.668624  0.723979
 0.884216   0.521359  0.957751  0.207386
 0.862909   0.286173  0.592699  0.965437

julia> A[:, vec(A[1,:] .> 0.7)]
4x2 Array{Float64,2}:
 0.748903  0.796249
 0.330299  0.723979
 0.521359  0.207386
 0.286173  0.965437

Another way is:
julia> A[:, A[1,:][:] .> 0.7]
4x2 Array{Float64,2}:
 0.748903  0.796249
 0.330299  0.723979
 0.521359  0.207386
 0.286173  0.965437

A:

You need to remove the extra dimension in the indexing array.
A=rand(4,4);
A[:,squeeze(A[1,:], 1).>0.7]

