function Tout = findT(H,TF,FA,FK,FM)
T1 = TF;
tol = 1e-6;
while(1)
    T2 = T1 + 0.01;
    Tnew = T1 - 0.01*fH(H,T1,FA,FK,FM)/(fH(H,T2,FA,FK,FM)-fH(H,T1,FA,FK,FM));
    if abs((Tnew-T1)/Tnew) < tol ; break ; end
    T1 = Tnew;
end
Tout = Tnew;
       
