Learn R Programming

matlab (version 1.0.4.1)

find: MATLAB find function

Description

Finds indices of elements.

Usage

find(x)

Value

Returns indices of corresponding elements matching the expression x.

Arguments

x

expression to evaluate

Author

P. Roebuck proebuck1701@gmail.com

Details

If expression is not logical, finds indices of nonzero elements of argument x.

Examples

Run this code
find(-3:3 >= 0)
find(c(0, 1, 0, 2, 3))

Run the code above in your browser using DataLab