>> TGS_phase_analysis('V_single_crystal-2019-06-30-06.40um-5degrees#2-POS-1.txt','V_single_crystal-2019-06-30-06.40um-5degrees#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.04883  (0.0484, 0.04926)
       k =   2.238e-05  (2.203e-05, 2.274e-05)
       beta =   4.022e-14  (fixed at bound)
       B =    0.005668  (0.005471, 0.005865)
       p =      -1.109  (-1.133, -1.086)
       t =   6.539e-08  (6.206e-08, 6.871e-08)
       D =   0.0006171  (0.0005463, 0.0006879)
     Problem parameters:
       q =   9.817e+05
       start_time =    2.45e-09
       peak_freq =   3.974e+08
Bad fit for:V_single_crystal-2019-06-30-06.40um-5degrees#2-POS-1.txt~re: beta

ans =

   3.9742e+08
