I want to generate 24 vectors of random numbers between 1 and 24 (inclusive), however I don't want to have any value in the same column position as the vector previously generated. For example:
If vector 1 is given by
v1 = [18 22 3 16 1 8 10 14 21 12 5 2 6 11 13 24 20 4 15 23 7 9 17 19];
vector 2 should be a different permutation such that 18 is not in the first column, 22 is not in the second column, 3 is not in the third column, etc.
Does anyone have an idea of how to approach this problem?
Best Answer