Conditional extraction of vector/matrix elements
Hi,
is it possible in one line to extract a sub-vector of all elements in another vector which satisfy some rule e.g. all elements > 0 for example?
I know how to do it in a programming loop but if there is a built in method then it's likely to be more efficient.
I can do it easily in matlab like:
z = x(x>0)
Thanks,
D

