function B = rowred(A) % rowred(A) returns the row reduced echolon form of a matrix A [m,n]=size(A); % A is an (m x n)-matrix r=1; % r is used to remember the row of A k=1; for i=1:n % i runs through the columns of A k = r; while (k