Hereby a matrix will be decomposed into an upper trangular and an lower triangular matrix. Often it will be used to increase the performance and stability (if it's done with permutation) of Gauß elimination.
However, quite often does this method not or badly work as it is not stable. For example
A = [8 1 6
3 5 7
4 9 2];
[L,U] = lu(A);
It is sufficient to add an permutation matrix such that PA=LU:
[L,U,P]=lu(A);
In the following we will now plot the runtime of `lu' dependent of the square root of elements of the matrix.