Hello, I've been trying to scramble the positions of a matrix. I have generated two sequences which help us to scramble the positions of the matrix. Eg;
X=[1 3 2 4] Y=[3 4 1 2]ie (X,Y) is used to scramble the positions of a 4x4 matrix Let A= 56 77 228 99 88 31 52 21 32 74 90 28 66 99 42 33now using the above two vectors i have the following order B= (1,3) (1,4) (1,1) (1,2) (3,3) (3,4) (3,1) (3,2) (2,3) (2,4) (2,1) (2,2) (4,3) (4,4) (4,1) (4,2)ie B= 228 99 56 77 90 28 32 74 52 21 88 31 42 33 66 99.
in addition i would also like to know how i can reverse the positions again ie th first element should be placed at (1,3). please help thanks in advance
Best Answer