rref
Gauss-Jordan elimination.
📝Syntax
R = rref(A)
R = rref(A, tol)
[R, p] = rref(A)
[R, p] = rref(A, tol)
📥Input Arguments
Parameter Description
A input matrix (double or single)
tol tolerance: scalar or max(rows, cols) * eps(class(A)) * norm(A, inf) (default)
📤Output Arguments
Parameter Description
R a matrix: reduced row echelon form of A.
p a vector: nonzero pivot columns.
📄Description

R = rref(A) returns the reduced row echelon form of A.

[R, p] = rref(A) returns also the nonzero pivots p.

💡Examples
A = [magic(4), eye(4)]
[R, p] = rref(A)
🔗See Also
rank
📚Bibliography
https://en.wikipedia.org/wiki/Gaussian_elimination
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub