B.6. THE MODIFIED MONTE CARLO METHOD FOR EXAMPLE 3.7 235
if (DD > Dt(1))
DD = Dt(1);
end
if (DD < Dt(4))
DD = Dt(4);
end
A = interp1 (Dt, At, DD);
b = interp1 (Dt, bt, DD);
% Compute the stress concentration factor
kt = A * (r / d) ^ b;
end
B.6 THE MODIFIED MONTE CARLO METHOD FOR
EXAMPLE 3.7
%The modified Monte Carlo method for Example 3.7
%Limit state function g(Sy,F,d)=Sy-4F/(pi*d^2)
%Input data
clear
mx=[34.5,7.0]; % The first parameter or mean
sx=[3.12,9.0]; % The second parameter or mean
sd=0.00125; % The standard deviation of the dimension
R=0.99; % The required reliability
% The first value for mean of d
xstar=norminv(1-R,mx(1),sx(1));
% Mean for F
mf=(mx(2)+sx(2))/2;
% The initial value of the dimension
mdd=(4*mf/pi/xstar)^0.5
N=15998400; % the trial number
Rsy=random('norm',mx(1),sx(1),1,N); % Random samples
% for Sy
Rf=random('unif',mx(2),sx(2),1,N); % Random samples
% for F
for K=1:2000
nn=0;
K
md=mdd+0.001; % Iterative dimension with an
% incremental 0.001"