hello, everyone

I met this problem during development.

it needs to generate a matrix p[n][m]. n,m are integer。
The number in matrix are random numbers。For every row, the sum should be 1 and for every column, the sum should be 1 too.
For example:
0 1 2 3 4 <--column numbers
0 0.1 0.1 0.1 0.1 0.6
1 0.2 0.1 0.1 0.5 0.1
2 0.1 0.1 0.6 0.1 0.1
3 0.1 0.5 0.1 0.15 0.15
4 0.5 0.2 0.1 0.15 0.05
5 <-- row numbers

Any help would be appreciated. ^-^
Thank you very much..