Definite Sum of density functions

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 comentarios

Michael Haderlein
Michael Haderlein el 30 de En. de 2015
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 el 1 de Feb. de 2015
Sorry for this, dgamma is the gamma density function of variables x and k (support) and parameter n.

Iniciar sesión para comentar.

 Respuesta aceptada

Star Strider
Star Strider el 30 de En. de 2015
Editada: Star Strider el 1 de Feb. de 2015

0 votos

See the documentation on the Gamma Distribution.

2 comentarios

Edwin FOURRIER
Edwin FOURRIER el 4 de Feb. de 2015
Thank you very much. I had never suspected this problem !
Star Strider
Star Strider el 4 de Feb. de 2015
My pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 30 de En. de 2015

Comentada:

el 4 de Feb. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by