Help with generating a random matrix with row and column constraint
- From: Ruchika Chhetri <ruchikachhetri@xxxxxxxxxxxxxx>
- Date: Mon, 19 Dec 2005 19:00:34 EST
Hi All,
I would greatly appreciate if someone could help me with the following problem.
I am trying to generate a 300X5 matrix of uniformly distributed random numbers with the following constraints.
1)All the elements in the matrix should be one of the following numbers : 0,1,2,3,4,5.
2)The sum of all the elements in each column should be 100
3)The sum across the row should be <= 5
4)I want to generate all these numbers as independent of each other as possible.
I understand that at one stage these numbers will be depending on one another to meet the constaint but is it possible to simulate the data in such a way that these numbers can be independent to a large extent.
I am trying to write a code to generate the data set in Matlab, but am struck with the algorithm. I shall be very thankful if someone can suggest an algorithm that can be coded in Matlab.
Thankyou,
Best Regards,
Ruchika
.
- Follow-Ups:
- Re: Help with generating a random matrix with row and column constraint
- From: Stephen M. Fortescue
- Re: Help with generating a random matrix with row and column constraint
- From: Fred Krogh
- Re: Help with generating a random matrix with row and column constraint
- From: Ray Koopman
- Re: Help with generating a random matrix with row and column constraint
- From: George Marsaglia
- Re: Help with generating a random matrix with row and column constraint
- From: John D'Errico
- Re: Help with generating a random matrix with row and column constraint
- Prev by Date: Which one is bigger?
- Next by Date: Re: Order of Magnitute(Big Oh)
- Previous by thread: Which one is bigger?
- Next by thread: Re: Help with generating a random matrix with row and column constraint
- Index(es):
Relevant Pages
|