"Torsten" wrote in message <k80a54$d5g$1@newscl01ah.mathworks.com>...
> "Jiana" wrote in message <k808tl$85q$1@newscl01ah.mathworks.com>...
> > please I need a help in writing a code for pdf of nakagami mdistribution in its theoretically and in a simulation way ...and if it is possible to derive it from Rayleigh distribution.
> >
> >
> >
> > I wrote this code for the theoretical pdf that i took it from Wikipedia
> > http://en.wikipedia.org/wiki/Nakagamim_distribution
> >
> > clear all
> > close all
> > %nakagami
> > x=0:0.01:7;
> > m=1;
> > shape=1;
> > f1=2*(m^m)*(x.^(2*m1));
> > x2=round(m);
> > f2=(factorial(x21))*(shape^m);
> > f3=(m/shape)*(x.^2);
> > pdf_theoretical=f1*f2.*exp(f3);
> > plot(x,pdf_theoretical)
> >
> > I had good results but i want to compare it by a simulated one that I didn't know how to write it.
> > thanks in advance.
> >
> >
>
> As the Wikipedia article says, you will have to generate random numbers of a
> Gamma distribution Gamma(k,theta) with k=m and theta=shape/m.
> Then the square roots of these random numbers follow a
> Nakagamimdistribution.
>
> help gamrnd
>
> Best wishes
> Torsten.
Thanks for your reply , I'll try this way also
but I think if I did like that I think it'd be like theoretical , I'd a simulation like generating random variables with nakagami distribution and computing the pdf for it , I kno that I can derive it from Rayleigh when m=1 but I couldn't have it .
