{mentor edit: image containing function code removed}
Please don’t post your code on the forum. That’s not allowed by the Code of Conduct.
If a mentor needs to see your code, we’ll contact you with instructions.
Two items for starters:
- Incorrect matrix indexing. Should be M[row,:].
- The first argument in this function should be the whole matrix, not a single row.
Please only post images of the error messages.