In Matlab, the preferred way of doing this is:

find(s < x)

In Julia, it's almost exactly the same:

find(s .< x)

If you don't need the indices, only the elements, you would do:

s[s .< x]

which, again, is almost identical to Matlab.

The reason you are getting a matrix output is that 

[1 2 5 7 3 3]

is actually a matrix (with one row) in Julia, which you then multiply with 
a (column) vector. If you want a vector, write

[1, 2, 5, 7, 3, 3]

Reply via email to