<< rcond Linear algebra rsf2csf >>

rref


Gauss-Jordan elimination.


Syntax


R = rref(A)
R = rref(A, tol)
[R, p] = rref(A)
[R, p] = rref(A, tol)

Input argument


A

input matrix (double or single)

tol

tolerance: scalar or max(rows, cols) * eps(class(A)) * norm(A, inf) (default)

Output argument


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.

Bibliography


https://en.wikipedia.org/wiki/Gaussian_elimination

Example


A = [magic(4), eye(4)]
[R, p] = rref(A)

See also


rank.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< rcond Linear algebra rsf2csf >>