solve.caracas_symbol {caracas} | R Documentation |
Solve a System of Linear Equations
Description
Solve a System of Linear Equations
Usage
## S3 method for class 'caracas_symbol'
solve(a, b, ...)
Arguments
a |
caracas_symbol |
b |
If provided, either a caracas_symbol (if not, |
... |
Not used |
Examples
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()
}
[Package caracas version 2.1.1 Index]