Fungsi umum ini menyelesaikan persamaan a %*% x = b untuk x, dimana b dapat berupa vektor atau matriks.
solve(a, b, …)<p></p><p># S3 method for default
solve(a, b, tol, LINPACK = FALSE, …)</p>
| Parameter | Deskripsi |
|---|---|
a |
a square numeric or complex matrix containing the coefficients of the linear system. Logical matrices are coerced to numeric. |
b |
a numeric or complex vector or matrix giving the right-hand side(s) of the linear system. If missing, b is taken to be an identity matrix and solve will return the inverse of a. |
tol |
the tolerance for detecting linear dependencies in the columns of a. The default is .Machine$double.eps. Not currently used with complex matrices a. |
LINPACK |
logical. Defunct and ignored. |
… |
further arguments passed to or from other methods |
# NOT RUN {
hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") }
h8 <- hilbert(8); h8
sh8 <- solve(h8)
round(sh8 %*% h8, 3)
A <- hilbert(4)
A[] <- as.complex(A)
## might not be supported on all platforms
try(solve(A))
# }