Learn R Programming

matlab (version 0.7-6)

find: MATLAB find function

Description

Finds indices of elements.

Usage

find(x)

Arguments

x
expression to evaluate

Value

  • Returns indices of corresponding elements matching the expression x.

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