Picking random variables with different probablities
Show older comments
I have a variable range lets say x = 3:6.
I want to pick 200 random numbers from this range (it could be any decimal number in the range). But I want these numbers to be picked with certain probability.
For example 20% of the numbers from the range 3:4,
50% of the numbers from the range 4:5,
and rest 30% of the numbers from the range 5:6.
How can i do this?
Thanks.
Accepted Answer
More Answers (0)
Categories
Find more on Uniform Distribution (Continuous) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!