Whenever I do a LU Factorization, MATLAB interchanges the row with the biggest numbers with the first row. This screws up the calculations (compared to how the book does it).

How do I make it so it stops screwing up the row interchanges?

$\displaystyle A = \left(\begin{array}{ccc} 2 & -1 & 1\\ 3 & 3 & 9\\ 3 & 3 & 5 \end{array}\right)$ $\displaystyle U = \left(\begin{array}{ccc} 3 & 3 & 9\\ 0 & -3 & -5\\ 0 & 0 & -4 \end{array}\right)$

My U from row reduction:

$\displaystyle U = \left(\begin{array}{ccc} 2 & -1 & 1\\ 0 & 9/2 & 15/2\\ 0 & 0 & -4 \end{array}\right)$