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

multiply

Elementwise Multiplication


Description

The elementwise product of two expressions. The first expression must be constant.

Usage

multiply(lh_exp, rh_exp)

Arguments

lh_exp

An Expression, vector, or matrix representing the left-hand value.

rh_exp

An Expression, vector, or matrix representing the right-hand value.

Value

An Expression representing the elementwise product of the inputs.

Examples

A <- Variable(2,2)
c <- cbind(c(1,-1), c(2,-2))
expr <- multiply(c, A)
obj <- Minimize(norm_inf(expr))
prob <- Problem(obj, list(A == 5))
result <- solve(prob)
result$value
result$getValue(expr)

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.