Matrix Trace
The sum of the diagonal entries in a matrix.
matrix_trace(expr)
expr |
An Expression or matrix. |
An Expression representing the trace of the input.
C <- Variable(3,3) val <- cbind(3:5, 6:8, 9:11) prob <- Problem(Maximize(matrix_trace(C)), list(C == val)) result <- solve(prob) result$value
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.