Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
References: <5473317.1232049736743.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232054641 9761 172.30.248.37 (15 Jan 2009 21:24:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 15 Jan 2009 21:24:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:511866

edin <edo_heineken@hotmail.com> wrote in message <5473317.1232049736743.JavaMail.jakarta@nitrogen.mathforum.org>...
>   .......
>     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

    suma2=suma2+BR(i)/(1+gpsk.*gamasr(j)/m)^k;

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