Write a program that allows the user to input a matrix and outputs the reduced echelon form. Please have comments on the code.
function Reduced_Row_Matrix = rre2(M) % M is a mtrix
% This is a function to reduce a matrix into
% Reduced Row Echelon form.
% The input matrix must be of a standard (m)*(m + 1) matrix