Re: generate random number for certain distribution



edward kabanyas wrote:

As we know that Matlab can generate random number with
several command. I need to generate random value for the
following gamma distribution:

f(D)=No*D^m*exp(-L*D);


As you know, that gamrnd(A,B,m,n) generates gamma random
numbers with parameters A and B. In my case, the gamma
equation is as I sent before, contain 3 parameters (modified
gamma).

juq, if No in your expression is anything other than L^(m+1) / gamma(m+1), you're going to have a hard time getting that "density" to integrate to 1. Your density may be written with three parameters, but only two of them are independent.

Are you sure you're fitting a distribution, and not fitting a curve that just happens to have the same shape as a gamma density?
.



Relevant Pages


Loading