Learn R Programming

CVXR (version 1.9.1)

length_expr: Length of a Vector (Last Nonzero Index)

Description

Returns the index of the last nonzero element of a vector (1-based). This atom is quasiconvex but NOT convex, so it can only be used in DQCP problems (solved with qcp = TRUE).

Usage

length_expr(x)

Value

A Length expression (scalar).

Arguments

x

A CVXR vector expression.

See Also

ceil_expr, floor_expr