Question: How to duplicate rows/columns in a matrix?

I have an n x n matrix. I am trying to write a procedure that will randomly choose a row (column) in the matrix, and replace another row (column) with the entries of the chosen row (column). So, the end result will be another n x n matrix that has two identical rows (columns). How could one do this?

Please Wait...