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

    %% Create a Normal Density Plot
% This example shows how to create a normal density plot.

% Copyright 2015 The MathWorks, Inc.


%%
% A production process fills cans of paint. The average amount of paint in
% any can is 1 gallon, but variability in the process produces a standard
% deviation of 2 ounces (2/128 gallons). What is the probability that the
% cans will be filled under specification by 3 or more ounces?
p = normspec([1-3/128,Inf],1,2/128,'outside')