MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > Simulation of 5 Random Variables with Sum Constrai... 

Subject: Simulation of 5 Random Variables with Sum Constraint From: Siddhartha Date: 27 Mar, 2013 20:50:11 Message: 1 of 9 
Let's say I have 5 random variables that are discrete. Each one of them can possess a low, base and high value somewhere between 15 and 35. I know their sum can never exceed 98. What's the best way to simulate this? Is the rejection method good? The sudden drop in the pdf of the sum bothers me, not sure if that's right, but it maybe. 
Subject: Simulation of 5 Random Variables with Sum Constraint From: Steven_Lord Date: 27 Mar, 2013 21:22:41 Message: 2 of 9 

Subject: Simulation of 5 Random Variables with Sum Constraint From: Siddhartha Date: 28 Mar, 2013 01:13:16 Message: 3 of 9 
Thank you! This is awesome. 
Subject: Simulation of 5 Random Variables with Sum Constraint From: Steven_Lord Date: 28 Mar, 2013 14:50:24 Message: 4 of 9 

Subject: Simulation of 5 Random Variables with Sum Constraint From: Bruno Luong Date: 28 Mar, 2013 15:04:18 Message: 5 of 9 
"Steven_Lord" <slord@mathworks.com> wrote in message . 
Subject: Simulation of 5 Random Variables with Sum Constraint From: Siddhartha Date: 28 Mar, 2013 20:08:06 Message: 6 of 9 
> When adding the bound constraints, there is some work to be done before apply this FEX. Please see this thread: 
Subject: Simulation of 5 Random Variables with Sum Constraint From: Bruno Luong Date: 28 Mar, 2013 21:34:18 Message: 7 of 9 
"Siddhartha " <siddhsam@hotmail.com> wrote in message 
Subject: Simulation of 5 Random Variables with Sum Constraint From: Siddhartha Date: 1 Apr, 2013 23:00:23 Message: 8 of 9 
You are right Bruno. 
Subject: Simulation of 5 Random Variables with Sum Constraint From: Bruno Luong Date: 3 Apr, 2013 07:05:13 Message: 9 of 9 
"Siddhartha " <siddhsam@hotmail.com> wrote in message <kjd3i7$qls$1@newscl01ah.mathworks.com>... 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.