Skip to content
Prev 56965 / 398498 Next

Equivalents of Matlab's 'find' and 'end'

On Thursday 07 October 2004 09:10, Bryan L. Brown wrote:
which(X==1)
I don't know of anything better than length(X) or nrow/ncol(X), but you 
could do X[-1], which is at least as elegant for your example, and 
would work for matrices as well.

Hth,

Deepayan