You are on page 1of 1

function [fatigue_life_weld]=weld(ranges,cc,delta_Sth)

k=0;
for i=1:length(ranges)
if ranges(i)>=delta_Sth
N(k+1)=(329*cc)/ranges(i)^3;
k=k+1;
end
end
% If there is not any load value that cracks the beam we stop the weld study
% If there is one value or more, then we calculate the fatigue life
if k==0
disp('There is not crack initiation next to the WELD, then the fatigue life will
be infinite')
fatigue_life_weld=0;
else
fatigue_life_weld=1./sum(1./N);
end

You might also like