diag<-.caracas_symbol | R Documentation |
Replace diagonal
## S3 replacement method for class 'caracas_symbol'
diag(x) <- value
x |
A |
value |
Replacement value |
if (has_sympy()) {
A <- matrix(c("a", 0, 0, 0, "a", "a", "a", 0, 0), 3, 3)
B <- as_sym(A)
B
diag(B)
diag(B) <- "b"
B
diag(B)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.