How can I determine a matrix $R$ in matlab such that, given a known matrix of coefficients $A$ gives me back its row reduced echelon form? Obviously I need an algorithm/function that works also with matrices that are not fully ranked.  $$RA=\text{rref}A$$I don't know how to handle this... please can anybody help me? Thanks a lot! :)
Matrix of linear transformation in MATLAB
matlab;matrices