upper_tri | R Documentation |
The vectorized strictly upper triangular entries of a matrix.
upper_tri(expr)
expr |
An Expression or matrix. |
An Expression representing the upper triangle of the input.
C <- Variable(3,3)
val <- cbind(3:5, 6:8, 9:11)
prob <- Problem(Maximize(upper_tri(C)[3,1]), list(C == val))
result <- solve(prob)
result$value
result$getValue(upper_tri(C))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.