MATLAB: How to write this equation on MATLAB

Kindly help me to write the equation on matlab. So that I can plot a graph. Also,if there is any mistake done please let me know.

Best Answer

You need tow for loops.
Cora = 0;
for k = 1:Lm
c1 = factorial(Lm-1) / (m / gamma)^k * exp(m / gamma) * ...
(-1)^(Lm-k) / factorial(Lm - k);
c2 = ... I leave this up to you
for m = 0:(Lm - k - 1)
c3 = ... I leave this up to you
end
Cora = Cora + c1 * c2 * c3;
end
This is meant as demonstration to show, that the implementation of a formula to Matlab code is not hard. Simply try it. It is straight forward.
Related Question