controlrules
Western Electric and Nelson control rules
Syntax
R = controlrules('
rules
',x,cl,se)
[R,RULES] = controlrules('rules
',x,cl,se)
Description
R = controlrules('
determines
which points in the vector rules
',x,cl,se)x
violate the control rules in
rules
. cl
is a vector of center-line values.
se
is a vector of standard errors. (Typically, control limits on a control
chart are at the values cl
– 3*se
and cl
+ 3*se
.) rules
is the name of a control rule, or a string
array or cell array containing multiple control rule names. If x
has
n values and rules
contains
m rules, then R
is an
n-by-m logical array, with R(i,j)
assigned the value 1
if point i
violates rule
j
, 0
if it does not.
The following are accepted values for rules
(specified
inside single quotes):
we1
— 1 point abovecl
+
3*se
we2
— 2 of 3 abovecl
+
2*se
we3
— 4 of 5 abovecl
+
se
we4
— 8 of 8 abovecl
we5
— 1 belowcl
–
3*se
we6
— 2 of 3 belowcl
–
2*se
we7
— 4 of 5 belowcl
–
se
we8
— 8 of 8 belowcl
we9
— 15 of 15 betweencl
–
se
andcl
+
se
we10
— 8 of 8 belowcl
–
se
or abovecl
+
se
n1
— 1 point belowcl
–
3*se
or abovecl
+
3*se
n2
— 9 of 9 on the same side ofcl
n3
— 6 of 6 increasing or decreasingn4
— 14 alternating up/downn5
— 2 of 3 belowcl
–
2*se
or abovecl
+
2*se
, same siden6
— 4 of 5 belowcl
–
se
or abovecl
+
se
, same siden7
— 15 of 15 betweencl
–
se
andcl
+
se
n8
— 8 of 8 belowcl
–
se
or abovecl
+
se
, either sidewe
— All Western Electric rulesn
— All Nelson rules
For multi-point rules, a rule violation at point i
indicates
that the set of points ending at point i
triggered
the rule. Point i
is considered to have violated
the rule only if it is one of the points violating the rule's condition.
Any points with NaN
as their x
, cl
,
or se
values are not considered to have violated
rules, and are not counted in the rules for other points.
Control rules can be specified in the controlchart
function
as values for the 'rules'
parameter.
[R,RULES] = controlrules('
returns
a cell array of text rules
',x,cl,se)RULES
listing the rules applied.
Examples
Version History
Introduced in R2006b