>> TGS_phase_analysis('V_single_crystal-2019-06-27-06.40um-90degrees-POS-1.txt','V_single_crystal-2019-06-27-06.40um-90degrees-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.08888  (0.08755, 0.09022)
       k =    1.22e-05  (1.199e-05, 1.241e-05)
       beta =   5.108e-07  (-3.579e-07, 1.379e-06)
       B =     0.01883  (0.01854, 0.01911)
       p =       2.699  (2.688, 2.71)
       t =   3.274e-08  (3.204e-08, 3.344e-08)
       D =    -0.00177  (-0.001957, -0.001583)
     Problem parameters:
       q =   9.817e+05
       start_time =    1.35e-09
       peak_freq =   3.973e+08

ans =

   3.9727e+08