Learn R Programming

quhomology (version 1.1.1)

GaussianElimination: Calculation of Gaussian Form of a matrix.

Description

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: $$ N = X G Y $$

Usage

GaussianElimination(A, B, tol = sqrt(.Machine$double.eps),
verbose = FALSE, fractions = FALSE)

Arguments

A

A Matrix to be turned into Gaussian Form.

B

An identity matrix, which will be returned as the row change multiplication matrix.

tol

Tolerance for checking for 0 pivot.

verbose

If TRUE, print intermediate steps.

fractions

If true, try to express nonintegers as rational numbers.

Value

A matrix

References

http://socserv.mcmaster.ca/jfox/Courses/R-course-Berkeley/

See Also

rref

Examples

Run this code
# 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