R = rref(A)R = rref(A,tol)R = rrefmovie(A)
R = rref(A) produces the reduced row echelon form of A using Gauss Jordan elimination with partial pivoting. A default tolerance of
tol = max(size(A))*eps*norm(A,inf)
is used to test for negligible column elements.
R = rref(A,tol) uses tol for the tolerance.
R = rrefmovie(A) shows a movie of the algorithm working.
rref on a rank-deficient magic square:
A = magic(4), R = rref(A)A =16 2 3 135 11 10 89 7 6 124 14 15 1R =1 0 0 10 1 0 30 0 1 -30 0 0 0
inv,lu,rank
(c) Copyright 1994 by The MathWorks, Inc.