This function calculates the Gaussian Form of a Matrix as well as the "row change" multiplication matrix, in short, both $N$ (the Gaussian Form) and $X$ for a matrix G of the form:
GaussianElimination(A, B, tol = sqrt(.Machine$double.eps),
verbose = FALSE, fractions = FALSE)
A Matrix to be turned into Gaussian Form.
An identity matrix, which will be returned as the row change multiplication matrix.
Tolerance for checking for 0 pivot.
If TRUE, print intermediate steps.
If true, try to express nonintegers as rational numbers.
A matrix
http://socserv.mcmaster.ca/jfox/Courses/R-course-Berkeley/
# NOT RUN {
test_mat <- matrix(c(2,4,4, -6,6,12, 10,-4,-16), nrow=3, ncol=3, byrow=TRUE)
identity_mat <- diag(3)
GaussianElimination(test_mat,identity_mat)
# }
Run the code above in your browser using DataLab