Hi, I have
a=[ 1 2; 3 4; 2 1; 4 5; 5 3]
I want to choose randomly any 2 entries from a column and exchange them. For example, I randomly choose entries 2 and 5 from the second column, exchange these two entries to become
b=[ 1 5; 3 4; 2 1; 4 2; 5 3]
How am I going to make this? Thanks in advance.
Best Answer