SwapRow - Week 2 Assignment Exercise 3


I am struggling with exercise 3 of assignment of week 2. I don’t know code to do SwapRows. I checked all ungraded lab and nowhere is information how to do it.

Thank you!

In the new matrix assign row 0 to row 1 of old matrix…

It is not helpful. I do not understand what I have to do exactly. If I type M_new[row_num_1] = M_new[row_num_2], it changes only the third row. The first row stays the same.

Finally, I’ve figured out. Thanks!