Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

abs

Absolute Value


Description

The elementwise absolute value.

Usage

## S4 method for signature 'Expression'
abs(x)

Arguments

x

An Expression.

Value

An Expression representing the absolute value of the input.

Examples

A <- Variable(2,2)
prob <- Problem(Minimize(sum(abs(A))), list(A <= -2))
result <- solve(prob)
result$value
result$getValue(A)

CVXR

Disciplined Convex Optimization

v1.0-10
Apache License 2.0 | file LICENSE
Authors
Anqi Fu [aut, cre], Balasubramanian Narasimhan [aut], David W Kang [aut], Steven Diamond [aut], John Miller [aut], Stephen Boyd [ctb], Paul Kunsberg Rosenfield [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.