MATLAB: Definite Sum of density functions

sum symsum density

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);

Best Answer

See the documentation on the Gamma Distribution.
Related Question