241
A P P E N D I X A
Samples of
MATLAB
®
Programs
A.1 THE H-L METHOD FOR EXAMPLE 3.11
% The H-L method for exmaple 3.11
% The Limit State function: g(Sy,Z,P,L)=Sy-P*L/(4Z)
% Input the distribution parameters mx-mean, sz-standard deviation
clear
mx=[6*10^5,10^(-4),10,8]; %The mean
sx=[10^5,2*10^(-5),2,2.083*10^(-2)]; % The standard deviation
beta=0; % Set beta=0
% Pick an initial design point x0(i)
for i=1:3
x0(i)=mx(i); % Use the mean for the first n-1 variable
end
% The last one x0(4) will be determined by using the limit state function
x0(4)=4*x0(1)*x0(2)/x0(3);
% Initial point in standard normal distribution space
for i=1:4
z0(i)=(x0(i)-mx(i))/sx(i);
end
% Start iterative process
for j=1:1000
% The Tylor series coefficent
G0(1)=sx(1)*1;
G0(2)=sx(2)*x0(3)*x0(4)/4/(x0(2))^2;
G0(3)=sx(3)*(-1)*x0(4)/4/x0(2);
G0(4)=sx(4)*(-1)*x0(3)/4/x0(2);
% Calculate the reliability index beta0
g00=0;
z00=0;
for i=1:4