From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: nakagami-m MGF average probability  bpsk
Date: Thu, 15 Jan 2009 21:24:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <gko9hh$9h1$>
References: <>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1232054641 9761 (15 Jan 2009 21:24:01 GMT)
NNTP-Posting-Date: Thu, 15 Jan 2009 21:24:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:511866

edin <> wrote in message <>...
>   .......
>     for k=1:(m-1)
>         for i=1:k  
>             T(i)=(factorial(2*k)/(factorial(k)^2))/(factorial(2*(k-i))/(((factorial(k-i))^2)*(4^i)*(2*(k-i)+1)));
>             BR(i)=T(i)*(cos(atan(alfa(j))))^(2*(k-i)+1);   
>         end;
>             suma2=suma2+BR(i)/(1+gpsk.*gamasr(j)/m)^k;
>     end;
>     ........

  I see something fishy here.  In the line


you are using the index i outside of the for-loop that was indexing with i.  I think what you get will be the last value of i in the loop.  I don't think that is what you had in mind.  Perhaps you meant for the line to be inside the loop.

Roger Stafford