% cdf of zero-centered laplacian random variable
function cdf = laplaciancdf(lambda,x)

cdfn = 1/2*exp(lambda*x);
cdfp = 1-1/2*exp(-lambda*x);
cdf  = cdfn.*(x<0) + cdfp.*(x>=0);