MATLAB Examples

Compute and Plot the Normal Distribution pdf

Compute the pdf of a standard normal distribution, with parameters $\mu$ equal to 0 and $\sigma$ equal to 1.

x = [-3:.1:3];
norm = normpdf(x,0,1);

Plot the pdf.

figure;
plot(x,norm)