MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > Random number choice according to probability dist... 

Subject: Random number choice according to probability distribution From: Emerson Date: 6 Mar, 2012 20:45:17 Message: 1 of 8 
Hi, 
Subject: Random number choice according to probability distribution From: TideMan Date: 6 Mar, 2012 21:56:24 Message: 2 of 8 
On Wednesday, March 7, 2012 9:45:17 AM UTC+13, Emerson wrote: 
Subject: Random number choice according to probability distribution From: TideMan Date: 6 Mar, 2012 22:00:00 Message: 3 of 8 
Sorry about the mess in my previous post. 
Subject: Random number choice according to probability distribution From: Roger Stafford Date: 6 Mar, 2012 22:26:18 Message: 4 of 8 
"Emerson" wrote in message <jj5t0t$d5f$1@newscl01ah.mathworks.com>... 
Subject: Random number choice according to probability distribution From: Emerson Date: 7 Mar, 2012 11:54:20 Message: 5 of 8 
Hi Roger, 
Subject: Random number choice according to probability distribution From: Torsten Date: 7 Mar, 2012 12:05:01 Message: 6 of 8 
On 7 Mrz., 12:54, "Emerson " <emerson1983...@gmail.com> wrote: 
Subject: Random number choice according to probability distribution From: Roger Stafford Date: 7 Mar, 2012 20:53:12 Message: 7 of 8 
"Emerson" wrote in message <jj7i9c$l0s$1@newscl01ah.mathworks.com>... 
Subject: Random number choice according to probability distribution From: Germán Date: 8 Mar, 2012 00:01:42 Message: 8 of 8 
If you want to get just ONE random sample drawn from 's' according to the normalized weights in 'p' you can simply use: 
No tags are associated with this thread.
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.