| Statistics Toolbox™ | ![]() |
p = capaplot(data,specs)
[p,h] = capaplot(data,specs)
p = capaplot(data,specs) estimates the mean of and variance for the observations in input vector data, and plots the pdf of the resulting T distribution. The observations in data are assumed to be normally distributed. The output, p, is the probability that a new observation from the estimated distribution will fall within the range specified by the two-element vector specs. The portion of the distribution between the lower and upper bounds specified in specs is shaded in the plot.
[p,h] = capaplot(data,specs) additionally returns handles to the plot elements in h.
Simulate a sample from a process with a mean of 3 and a standard deviation of 0.005:
data = normrnd(3,0.005,100,1);
Compute capability indices if the process has an upper specification limit of 3.01 and a lower specification limit of 2.99:
S = capability(data,[2.99 3.01])
S =
mu: 3.0006
sigma: 0.0047
P: 0.9669
Pl: 0.0116
Pu: 0.0215
Cp: 0.7156
Cpl: 0.7567
Cpu: 0.6744
Cpk: 0.6744Visualize the specification and process widths:
capaplot(data,[2.99 3.01]); grid on

![]() | capability | caseread | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |