I a having a system with maximum number of users to be 6.
A =[1 2;
1 3;
2 5;
2 4;
3 5;
4 6
4 5]
In each row i can get only two numbers out of 6.
But i want to display all the numbers in each row of the matrix in the following manner
[1 2 3 4 5 6;
1 3 2 4 5 6;
2 5 1 3 4 6;
2 4 1 3 5 6;
3 5 1 2 4 6;
4 6 1 2 3 5;
4 5 1 2 3 4]
So I want to reshape the matrix A inorder to get the above matrix
Could anyone please help me on this.
Best Answer