I have been searching the web for nearly 3 hours about a MatLab function that can take matrix A and give me back L, D, and U. Does such function exist in MatLab?
Please feel free to change the title of the question if you think it's not expressive enough.
This can be performed in Matlab as follows:
This allows you to write $LDU = PA$, where $P$ is a permutation matrix.