|
-
question about random and marix
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..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks