In: Mechanical Engineering
Measurements of a number of fittings show that the pitch diameter of the thread is normally distributed with a mean of 8.007 mm and a standard deviation of 0.005 mm. The design specifications require that the pitch diameter be 8 ± 0.01 mm. Estimate the percentage of fittings that will be within tolerance.
Program plan:
• To write a matlab code to find the percentage of fittings that will be within tolerance.
Program:
%**********************************************************
%A matlab code is written to estimate the percentage of
%fittings that will be within tolerance.
%**********************************************************
%Declaration of mean
mu=8.007;
%Declaration of standard deviation
sigma=0.005;
%Computes the value
z1=(7.99-mu)/sigma;
%Computes the value
z2=(8.01-mu)/sigma;
%Computes the values of percentage of fittings that will be within tolerance
p=100*(1-erf(z1/sqrt(2))-1+erf(z2/sqrt(2)))/2;
%Displays text
disp('The percent of the fitting that will be within tolerance');
%Displays value
disp(p);
Output:
>> Untitled
The percent of the fitting that will be within tolerance
72.5410
The percent of the fitting that will be within tolerance
72.5410