controlrules - Western Electric and Nelson control rules

Syntax

R = controlrules(rules,x,cl,se)
[R,RULES] = controlrules(...)

Description

R = controlrules(rules,x,cl,se) determines which points in the vector 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 cl3*se and cl + 3*se.) rules is the name of a control rule, or a cell array containing multiple control rule names, from the list below. 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:

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 strings RULES listing the rules applied.

Example

Create an xbar chart using the we2 rule to mark out of control measurements:

load parts;
st = controlchart(runout,'rules','we2');
x = st.mean;
cl = st.mu;
se = st.sigma./sqrt(st.n);
hold on
plot(cl+2*se,'m')

Use controlrules to identify the measurements that violate the control rule:

R = controlrules('we2',x,cl,se);
I = find(R)
I = 
   21
   23
   24
   25
   26
   27 

See Also

controlchart

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS