MATLAB: Exponential random number generation probabilityrandom number generatorstatistics hi, How to generate the exponential random numbers from uniform random number generator? thx Best Answer lambda = 2;x = -log(rand(1,1000000)/lambda)x will be exponentially distributed. See, for example, http://en.wikipedia.org/wiki/Exponential_distribution#Generating_exponential_variates Related SolutionsMATLAB: Generate real random numbers Such as randn() ? Or one of the random distribution tools in the Statistics Toolbox ? MATLAB: How am I to generate random numbers with exponential distribution applied pd = makedist('Exponential','mu', 0.2);r=0.5+random(pd)but this gives you values with 0.5 + a random number if you want just the numbers that are bigger than 0.5 do this:pd = makedist('Exponential','mu', 0.2);r=0;while r<0.5r=random(pd);end Related QuestionGenerate Random Sample between [0,1)Random numbersGenerate n random number between two numbers follow exponential distributionWhat algorithm is matlab using to create randn numbers
Best Answer