solve.caracas_symbol | R Documentation |
Solve a System of Linear Equations
## S3 method for class 'caracas_symbol'
solve(a, b, ...)
a |
caracas_symbol |
b |
If provided, either a caracas_symbol (if not, |
... |
Not used |
if (has_sympy()) {
A <- matrix_sym(2, 2, "a")
b <- vector_sym(2, "b")
# Inverse of A:
solve(A)
inv(A)
solve(A) %*% A |> simplify()
# Find x in Ax = b
x <- solve(A, b)
A %*% x |> simplify()
solve(A, c(2, 1)) |> simplify()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.