filter
eachindex
julia> A = collect(1:8); println(A)
[1, 2, 3, 4, 5, 6, 7, 8]
julia> A[ filter(x->!(x in [5,6]) && x>2, eachindex(A)) ]
4-element Array{Int64,1}:
3
4
7
8
If you apply a filter to each array size, you will need to replace eachindex(A)
with indices(A,n)
, where n
is the corresponding measurement, for example
B[ filter(x->!(x in [5,6])&&x>2, indices(B,1)), filter(x->x>3, indices(B,2)) ]
source
share