I need to compute :
Sum (from n=1 to N) [dgamma(x,n)*(1-dgamma(k,n))]
Sorry for the form I don't managed to do something esthetic.
Have you got an idea ? I have tried this in vain :
% Try 1
N = 100;
S = 0;
for n = 1:N
S = S + (dgamma(x,n)*(1-dgamma(k,n)));
end
% Try 2
N = 100;
syms n m
S = symsum(dgamma(x,n)*(1-dgamma(k,n)),n,1,N);

댓글 수: 2

Michael Haderlein
Michael Haderlein 2015년 1월 30일
Your question is a bit unclear:
What is dgamma (function or array)? If it's an array, will N be the length of dgamma? What is x and k?
Edwin FOURRIER
Edwin FOURRIER 2015년 2월 1일
Sorry for this, dgamma is the gamma density function of variables x and k (support) and parameter n.

댓글을 달려면 로그인하십시오.

 채택된 답변

Star Strider
Star Strider 2015년 1월 30일
편집: Star Strider 2015년 2월 1일

0 개 추천

See the documentation on the Gamma Distribution.

댓글 수: 2

Edwin FOURRIER
Edwin FOURRIER 2015년 2월 4일
Thank you very much. I had never suspected this problem !
Star Strider
Star Strider 2015년 2월 4일
My pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

질문:

2015년 1월 30일

댓글:

2015년 2월 4일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by