www.gusucode.com > stats 源码程序 matlab案例代码 > stats/ComputeTheExponentialDistributionPdfExample.m

    %% Compute the Exponential Distribution pdf
%

% Copyright 2015 The MathWorks, Inc.


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