Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

find

find function (Matlab Style)


Description

Finds indices of nonzero elements.

Usage

finds(v)

Arguments

v

logical or numeric vector or array

Details

Finds indices of true or nonzero elements of argument v; can be used with a logical expression.

Value

Indices of elements matching the expression x.

Examples

finds(-3:3 >= 0)
finds(c(0, 1, 0, 2, 3))

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.