The "GEE! It's Simple" package illustrates Gaussian elimination with partial pivoting, which produces a factorization of P*A into the product L*U where P is a permutation matrix, and L and U are lower and upper triangular, respectively.
The functions in this package are accurate, but they are far slower than their MATLAB equivalents (x=A\b, [L,U,p]=lu(A), and so on). They are presented here merely to illustrate and educate. "Real" production code should use backslash and lu, not this package.
For a detailed derivation of Gaussian elimination with partial pivoting, see Sections 3.1 and 6.3 of "Direct Methods for Sparse Linear Systems", Davis, SIAM, 2006 ( http://www.ec-securehost.com/SIAM/FA02.html ), or "Numerical Computing with MATLAB" by Cleve Moler, SIAM, 2004. You can obtain the PDF version of Cleve's book at http://www.mathworks.com/moler or you can buy a hard copy at http://ec-securehost.com/SIAM/ot87.html . See also Nick Higham's Matrix Computation Toolbox (File ID 2360), and his related book, Accuracy and Stability of Numerical Algorithms (SIAM, Second edition, August 2002, xxx+680 pp.).
I have tested this on MATLAB 7.5, but it should work on "any" MATLAB version. If you find a back-porting problem on older MATLAB versions, please let me know.