Fitting of experimental data within two different regions
问题 I am fitting a set of experimental data (sample) within two different experimental regions and can be expressed with two mathematical functions as follows: 1st region: y = m*x + c ( the slope can be constrained to zero) 2nd region: y = d*exp(-k*x) the experimental data is shown below and I coded it in python as follows: def func(x, m, c, d, k): return m*x+ c + d*np.exp(-k*x) popt, pcov = curve_fit(func, t, y) Unfortunately, my data is not fitting properly and fitted (returned) parameters do