Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Randomize a matrix

$
0
0
Hey guys.

I posted a complex problem few days back. No reply! :|
Here is simplified question:

I have a matrix with 0/1:
Code:

*        col1  col2  col3
row1    1      0      1
row2    0      0      1
row3    1      1      1
row4    1      0      0

I wanna randomize it 1000 times (or even more!) and have matrices with the same sum for each row and column as it is in input file.

Any ideas?

Thanks

Viewing all articles
Browse latest Browse all 16232

Trending Articles