Method on @sym: r = rref (A)
Method on @sym: [r, k] = rref (A)

Reduced Row Echelon Form of a symbolic matrix.

Example:

A = sym([1 2 3; 2 3 4]);
rref (A)
  ⇒ (sym 2×3 matrix)

      ⎡1  0  -1⎤
      ⎢        ⎥
      ⎣0  1  2 ⎦

Optional second output gives the indices of pivots.

See also: @sym/rank, @sym/null, @sym/orth.

Package: symbolic