Learn R Programming

CVXR (version 1.0-14)

max_elemwise: Elementwise Maximum

Description

The elementwise maximum.

Usage

max_elemwise(arg1, arg2, ...)

Value

An Expression representing the elementwise maximum of the inputs.

Arguments

arg1

An Expression, vector, or matrix.

arg2

An Expression, vector, or matrix.

...

Additional Expression objects, vectors, or matrices.

Examples

Run this code
c <- matrix(c(1,-1))
prob <- Problem(Minimize(max_elemwise(t(c), 2, 2 + t(c))[2]))
result <- solve(prob)
result$value

Run the code above in your browser using DataLab