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

    %% XBar and R Charts
%%
% Load the sample data.

% Copyright 2015 The MathWorks, Inc.

load parts
%%
% Create xbar and r control charts for the data.
st = controlchart(runout,'chart',{'xbar' 'r'});
%%
% Display the process mean and standard deviation.
fprintf('Parameter estimates:  mu = %g, sigma = %g\n',st.mu,st.sigma);