Help creating xbar control chart

46 vues (au cours des 30 derniers jours)
Michael Boyle
Michael Boyle le 3 Déc 2021
Réponse apportée : Dave B le 4 Déc 2021
I have a column vector of data and I am trying to create an xbar control chart from it.
x = (0:1:50)';
y = controlchart(x,'charttype','xbar');
when I try to create the control chart I get the error:
Error using controlchart>getctypeinfo (line 452)
XBAR, S, and R charts required grouped data.
Error in controlchart (line 213)
[cctypes,distn] = getctypeinfo(charttype, grouped);
Error in ESE405_final_project (line 213)
y = controlchart(x,'charttype','xbar');
is there something special that needs to be done for an xbar control chart?

Réponses (1)

Dave B
Dave B le 4 Déc 2021
You specified x as a vector, but controlchart doesn't accept x as a vector. controlchart is going to use means and limits, and it can't do this if x is a vector:
From the help:
controlchart(X) produces an xbar chart of the data in X. If X is a
matrix, its rows should be in time order and should contain replicate
observations taken at the same time. If X is a timeseries object,
the sample at each time should contain replicate observations. The
plot displays the means of each subgroup, or collection of replicate
observations, along with a center line (CL) and lower and upper control
limits (LCL and UCL) to determine if the process is in control. The
control limits are three-sigma limits, with sigma estimated from the
average of the subgroup standard deviations.

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by