>> TGS_phase_analysis('V_single_crystal-2019-06-30-06.40um-55degrees#2-POS-1.txt','V_single_crystal-2019-06-30-06.40um-55degrees#2-NEG-1.txt',6.4,1)

f2 = 

     General model:
     f2(x) = A.*(erfc(q*sqrt(k*(x+start_time)))-beta*exp(-q^2*k*(x+start_time)
                    )./sqrt((x+start_time)))+B.*sin(2*pi*(peak_freq)*(x+
                    start_time)+p)*exp(-(x+start_time)/t)+D
     Coefficients (with 95% confidence bounds):
       A =     0.05519  (0.05405, 0.05633)
       k =   1.237e-05  (1.209e-05, 1.266e-05)
       beta =   1.919e-08  (-1.171e-06, 1.209e-06)
       B =    0.009555  (0.009354, 0.009755)
       p =       2.863  (2.849, 2.878)
       t =   4.705e-08  (4.561e-08, 4.849e-08)
       D =   -0.001271  (-0.001428, -0.001113)
     Problem parameters:
       q =   9.817e+05
       start_time =     1.3e-09
       peak_freq =   3.942e+08

ans =

   3.9421e+08