The function rref
in MATLAB can be used to find the reduced row echelon form (rref) of an augmented matrix. The syntax for using the function is as follows:
main.m66 chars3 lines
where A
is the coefficient matrix, b
is the right-hand side vector, and A_augmented
is the augmented matrix formed by concatenating A
and b
. The output rref_A_augmented
is the reduced row echelon form of A_augmented
.
Here's an example:
main.m263 chars11 lines
In this example, we first form the augmented matrix A_augmented
by concatenating A
and b
. We then apply the rref
function to A_augmented
and store the result in rref_A_augmented
. The resulting matrix is the reduced row echelon form of A_augmented
.
gistlibby LogSnag