How could I generate 10000 samples of a random variable using rand?
Show older comments
Hello,
I am attempting to generate 10000 independent realizations of the following random variable (16*y)/(x+23)^(y+1) for x>=0.
This is what I have done so far:
X= rand(1,10000);
Y=rand(1,10000);
k= (16*Y)/(X+23).^(Y+1)
I get a 1X10000 double for X and Y but I only get one value for k.
How do I go about getting 10000 values for k?
thanks
Accepted Answer
More Answers (0)
Categories
Find more on Random Number Generation 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!