norm,Expression,character-method | R Documentation |
The matrix norm, which can be the 1-norm ("1"), infinity-norm ("I"), Frobenius norm ("F"), maximum modulus of all the entries ("M"), or the spectral norm ("2"), as determined by the value of type.
## S4 method for signature 'Expression,character'
norm(x, type)
x |
An Expression. |
type |
A character indicating the type of norm desired.
|
An Expression representing the norm of the input.
The p_norm
function calculates the vector p-norm.
C <- Variable(3,2)
val <- Constant(rbind(c(1,2), c(3,4), c(5,6)))
prob <- Problem(Minimize(norm(C, "F")), list(C == val))
result <- solve(prob, solver = "SCS")
result$value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.