## Resolved: How to compute CDF from a given PMF in Matlab

Question: For a given PMF p=f(\theta) for \theta between 0 and 2\pi, i computed the CDF in Matlab as and the result is verified. I tried to do the same with cumsum as cdf=cumsum(p)*(2*pi)/n but the result is wrong. why? ...