clould you please assist me to solve the following question:
I need to get random of (0,1) matrices with size (n*m) with the following constraints:
- Each row has only one (1) and the other values are (0's)
as in the following example:
Example :: for matrix (3*2) as we see we have only one (1) in each row and the other columns are 0's
[1 0 0
1 0 0]
———
[1 0 0
0 1 0]
———
[1 0 0
0 0 1]
——–
[0 1 0
1 0 0]
———-
[0 1 0
0 1 0]
———
[0 1 0
0 0 1]
——–
[0 0 1
1 0 0]
——–
[0 0 1
0 1 0]
——–
[0 0 1
0 0 1]
Best Answer