Capability analysis CPK vs PPK calculation?

13 次查看(过去 30 天)
Cailin
Cailin 2023-10-23
回答: Abhaya 2024-8-9,6:18
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?

回答(1 个)

Abhaya
Abhaya 2024-8-9,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])
x = struct with fields:
mu: 10.0480 sigma: 0.1295 Ppk: 0.3913

类别

Help CenterFile Exchange 中查找有关 Parallel for-Loops (parfor) 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by