find_last

Find the last true element index from a boolean vector.

Namespace: dsp

Prototype

int find_last(const Vecb &x)

Description

Example

let x   = linspace(-2, 2, 5); // -2, -1, 0, 1, 2
let idx = find_last(x <= 1); // idx = 3

See also

find(), find_last()