>> TGS_phase_analysis('V_single_crystal-2019-06-30-06.40um-65degrees#2-POS-1.txt','V_single_crystal-2019-06-30-06.40um-65degrees#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.05537  (0.0545, 0.05624)
       k =   1.169e-05  (1.147e-05, 1.191e-05)
       beta =   9.416e-08  (-8.323e-07, 1.021e-06)
       B =     0.01273  (0.01256, 0.0129)
       p =        2.48  (2.471, 2.489)
       t =   4.104e-08  (4.026e-08, 4.182e-08)
       D =   0.0001577  (2.396e-05, 0.0002914)
     Problem parameters:
       q =   9.817e+05
       start_time =    1.35e-09
       peak_freq =   3.948e+08

ans =

   3.9477e+08