Hi all,

So imagine I have an array. For example:

s = [1 2 5 7 3 3]


Also, I have x = 4. And I would like to have an array of indexes 
of elements s that satisfy:

s .< x

 
In Fortran or MATLAB I would do something like this:

indx = 1:1:size(s) (or length(s) in MATLAB)

And then:

indx = pack(indx,s>x)

 
or 

indx=indx(s < x)

 
In Julia I tried something like:

indx = indx.*(s .< x)


But I had a matrix in output for some reason. So what is the easiest 
solution in this situation?

Reply via email to