exponential distribution

edited May 2008 in Science & Tech
I want to generate 52 exponential numbers whos mean is 22057 in matlab.. please help ASAP...
thank u


:(

Comments

  • shwaipshwaip bluffin' with my muffin Icrontian
    edited May 2008
    you can generate an exponential RV with mean M by doing the following:

    uni = rand(1,52);
    ex = -log(uni)/M;
    
  • edited May 2008
    Dint actually get it.... i copied and pasted it but Matlab dint do anything.. there a full possibility that i did it wrong since i am a newbie at using the software. please if you can explain in detail...
    wht i did was i copied the code
    n just changed m in it...
    shwaip wrote:
    you can generate an exponential RV with mean M by doing the following:

    uni = rand(1,52);
    ex = -log(uni)/M;
    
  • shwaipshwaip bluffin' with my muffin Icrontian
    edited May 2008
    the variable ex is now an iid exponential random variable with mean 1/M. with 52 draws from it.
Sign In or Register to comment.