Compute and Plot the Normal Distribution pdf
Compute the pdf of a standard normal distribution, with parameters equal to 0 and
equal to 1.
x = [-3:.1:3]; norm = normpdf(x,0,1);
Plot the pdf.
figure; plot(x,norm)

MATLAB Examples
Compute the pdf of a standard normal distribution, with parameters equal to 0 and
equal to 1.
x = [-3:.1:3]; norm = normpdf(x,0,1);
Plot the pdf.
figure; plot(x,norm)
Copyright 2015 The MathWorks, Inc.
Published with MATLAB® R2018a
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. Please see www.mathworks.com/trademarks for a list of other trademarks owned by The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective owners.
openExample('stats/ComputeAndPlotTheNormalDistributionPdfExample')
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
SelectYou can also select a location from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.