controlrules
Western Electric and Nelson control rules
Description
Examples
Load the parts
data set.
load parts;
Create an X-bar chart using the controlchart
function. Specify the we4
rule to mark out-of-control measurements. Return the subgroup statistics and plot data.
[stats,plotted] = controlchart(runout,rules="we4");
The red lines in the chart indicate the control limits, and out-of-control points are marked with a red circle. Display the subgroup numbers of the out-of-control points.
find(plotted.ooc)
ans = 4×1
2
21
25
27
Identify the measurements that violate the we4
control rule by displaying the indices of the non-zero values returned by the controlrules
function.
R = controlrules("we4",plotted.pts,plotted.cl(1),plotted.se(1));
I = find(R)
I = 27
The subgroups 2, 21, and 25 are out of control because they are outside the control limits. Subgroup 27 violates the we4
control rule because it is the last of eight consecutive points that lie above the center line.
Input Arguments
Control rules, specified as a character vector, string scalar, string array, or cell array of character vectors containing one or more of the following values. Note that values containing "we" are Western Electric rules, and values containing "n" are Nelson rules.
Value | Violation Condition |
---|---|
"we1" | |
"we2" | Two of three points above |
"we3" | Four of five points above |
"we4" | Eight of eight points above cl |
"we5" | One point below |
"we6" | Two of three points below |
"we7" | Four of five points below |
"we8" | Eight of eight points below cl |
"we9" | Fifteen of fifteen points between |
"we10" | Eight of eight points below |
"n1" | One point below |
"n2" | Nine of nine points on the same side of cl |
"n3" | Six of six points increasing or decreasing |
"n4" | Fourteen points alternating up or down |
"n5" | Two of three points below |
"n6" | Four of five points below |
"n7" | Fifteen of fifteen points between |
"n8" | Eight of eight points below |
"we" | All Western Electric rules |
"n" | All Nelson rules |
For the control rules that involve more than a single point:
Data Types: char
| string
Points to evaluate, specified as a numeric vector.
Data Types: single
| double
Center lines, specified as a numeric vector that has the same length as
X
. You can also specify cl
as a numeric
scalar, in which case the function uses the same value for all points.
Data Types: single
| double
Standard errors, specified as a numeric vector that has the same length as
X
. You can also specify se
as a numeric
scalar, in which case the function uses the same value for all points.
Data Types: single
| double
Output Arguments
Control rule violation indicators, returned as a logical matrix or vector. The
function returns indicators for the points in X
, using the rules in
rules
, center line values cl
, and standard
errors se
. If X
contains
n points and rules
contains
m rules, then R
is an
n-by-m logical matrix, where
R(i,j)
has the value true
(logical
1
) if point i
violates rule
j
, and the value false
(logical
0
) if it does not. If rules
contains only one
control rule, R
is a logical vector of length
n.
Names of the applied control rules, returned as a cell array of character vectors.
If rules
includes "we"
or
"n"
, all of the associated rules are included in
appliedRules
.
Version History
Introduced in R2006b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)