matxf = zeros(max(big_dof),1);
force = rmmissing(data(:,14));
matxf(fdof,1) = matxf(fdof,1) + f;
matxfl_inc1 = zeros(max(big_dof),1);
td_f1inc = length(rmmissing((data2(:,2))))
matxfl_inc1(fdofl_1inc,1) = matxfl_inc1(fdofl_1inc,1) + floop_1inc;
afl_inc1=matxfl_inc1(a_dof,1);
matxfl_dec1 = zeros(max(big_dof),1);
td_f1dec = length(rmmissing((data2(:,4))))
matxfl_dec1(fdofl_1dec,1) = matxfl_dec1(fdofl_1dec,1) + floop_1dec;
afl_dec1=matxfl_dec1(a_dof,1);
matxfl_inc2 = zeros(max(big_dof),1);
td_f2inc = length(rmmissing((data2(:,12))))
fdofl_2inc = data2(u,12);
floop_2inc = data2(u,13);
matxfl_inc2(fdofl_2inc,1) = matxfl_inc2(fdofl_2inc,1) + floop_2inc;
afl_inc2=matxfl_inc2(a_dof,1);
matxfl_dec2 = zeros(max(big_dof),1);
td_f2dec = length(rmmissing((data2(:,14))))
fdofl_2dec = data2(u,14);
floop_2dec = data2(u,15);
matxfl_dec2(fdofl_2dec,1) = matxfl_dec2(fdofl_2dec,1) + floop_2dec;
afl_dec2=matxfl_dec2(a_dof,1);
def_int = zeros(big_dof,1);
for_int = zeros(big_dof,1);
def_int(dof_act,1)=def_int(dof_act,1)+def_val;
for_int(dof_act,1)=for_int(dof_act,1)+for_val;
defl_x = defl(1:3:big_dof);
defl_y = defl(2:3:big_dof);
defl_t = defl(3:3:big_dof);
newp_t = (pos_t + defl_t);
a3defl_i= zeros(big_nod,3);
dpint_1 = a3pos_i((ceil(data2(:,11)/3)),data2(:,10));
deint_1 = a3defl_i((ceil(data2(:,7)/3)),data2(:,6));
dpint_2 = a3pos_i((ceil(data2(:,21)/3)),data2(:,20));
deint_2 = a3defl_i((ceil(data2(:,17)/3)),data2(:,16));
tol_1(calc)=abs((deint_1)/(idp_1 - dpint_1))
tol_2(calc)=abs((deint_2)/(idp_2 - dpint_2))
while tol_1(calc) >= 0 & tol_2(calc) >= 0
loop(calc)=loop(calc-1)+1
elseif tol_1 >= 0.9 & tol_1 < 1
elseif tol_2 >= 0.9 & tol_2 < 1
if tol_1 >= 0.9 & tol_1 < 1 & tol_2 >= 0.9 & tol_2 < 1
defl_loop_ans = kkk*act_f;
defl_loop = zeros(big_dof,1);
for_loop = zeros(big_dof,1);
def_val=defl_loop_ans(mm,1);
defl_loop(dof_act,1)=defl_loop(dof_act,1)+def_val;
for_loop(dof_act,1)=for_loop(dof_act,1)+for_val;
defl_x = defl(1:3:big_dof);
defl_y = defl(2:3:big_dof);
defl_t = defl(3:3:big_dof);
newp_t = (pos_t + defl_t);
adefl_lo= zeros(big_nod,3);
delo_1 = adefl_lo((ceil(data2(:,7)/3)),data2(:,6));
delo_2 = adefl_lo((ceil(data2(:,17)/3)),data2(:,16));
tol_1(calc)=((delo_1)/(idp_1 - dpint_1))
tol_2(calc)=((delo_2)/(idp_2 - dpint_2))
if last_tol1 >= 0.9 && last_tol2 >= 0.9 && last_tol1 < 1 && last_tol2 < 1
disp('force calc is done!!')