Capability analysis CPK vs PPK calculation?
13 views (last 30 days)
Show older comments
The S = capability(data,specs) function provides a capability analysis with resultant CPK (capability within subgroups), is there a way to calculate PPK (overall capability) for a data set?
0 Comments
Answers (1)
Abhaya
on 9 Aug 2024 at 6:18
Hi,
I understand you want to calculate process performance index.
I have calculated the Ppk value for vector ‘x’ using following code. I have set the lower specification limit (LSL) = 9.8 and upper specification limit (USL) = 10.2 .
The code is as follows:
function S=ppkCalc(data,spec)
%claculate mean
S.mu=mean(mean(data));
%find the sum of square of each number
sumSq=sumsqr(data);
%find standard deviation
sz=size(data);
n=sz(1)*sz(2);
S.sigma=sqrt((sumSq-n*(S.mu^2))/(n-1));
LSL=spec(1);
USL=spec(2);
S.Ppk=min((S.mu-LSL)/(3*S.sigma),(USL-S.mu)/(3*S.sigma));
end
% the following measurement are for five different objects with target of 10 and tolerance 0.2
mat=[10.1 10.0 9.9 10.2 10.0;
10.0 10.1 9.8 10.2 10.1;
10.3 10.0 10.1 9.9 10.2;
10.0 9.9 10.1 10.0 10.2;
9.8 10.1 10.0 10.2 10.0];
%call the function
x=ppkCalc(mat,[9.8 10.2])
0 Comments
See Also
Categories
Find more on Parallel for-Loops (parfor) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!