MATLAB Examples

Compute the Exponential Distribution pdf

Compute the pdf of an exponential distribution with parameter mu = 2.

x = 0:0.1:10;
y = exppdf(x,2);

Plot the pdf.

figure;
plot(x,y)