Programming Assignment Wrong Output

I have no idea whats wrong with this code. Someone help me.

{moderator edit - solution code removed}

I have not taken M4ML, so I’m only guessing what this is about, but it looks like you are implementing Gaussian Elimination here. That’s supposed to leave you with an output matrix in which everything is zero below and to the left of the diagonal, right? You can see that is what they are “expecting” in their test values, but your code is not delivering that. Please have another look at the instructions that accompany that code and see if you missed something.

Thank you for your response sir