Even after you fix the problems in multiplication, let me look at your model and your data.
syms c2 k12 k2e t
fun = 120*c2*k12*((exp(-k12*t)/(k2e-k12))+ (exp(-k2e*t)/(k12-k2e)));
pretty(fun)
/ exp(-k12 t) exp(-k2e t) \
-c2 k12 | ----------- - ----------- | 120
\ k12 - k2e k12 - k2e /
So a difference between a pair of negative exponentials, but not a model that allows much flexibility. This is always a very difficult problem to solve, one that requires good data. Is your data at all good?
t = [0 5 15 30 90 180 360 720 1440 2160 2880 3600 4320];
y = [0 3.13 8.40 17.15 43.19 66.53 91.38 103.82 111 108.18 98.66 106.40 100.67];
plot(t,y,'-o')
UGH. Not terribly great data. That serious noise on the top end means your parameters will be not well estimated.
However, let me see if I can make it work. Some moderately intelligent guesses for starting values will be helpful. I'll use the curve fitting toolbox, since it returns nice confidence limits on the parameters,
ft = fittype('120*c2*k12*((exp(-k12*t)/(k2e-k12))+ (exp(-k2e*t)/(k12-k2e)))','indep','t','coef',{'c2','k12','k2e'});
mdl = fit(t',y',ft,'start',[100,.001 .0001])
mdl =
General model:
mdl(t) = 120*c2*k12*((exp(-k12*t)/(k2e-k12))+ (exp(-k2e*t)/(k12-k2e)))
Coefficients (with 95
c2 = 259.1 (-42.19, 560.5)
k12 = 1.853e-05 (-2.137e-06, 3.921e-05)
k2e = 0.005252 (0.0045, 0.006004)
plot(mdl)
hold on
plot(t,y,'o')
Honestly, I was surprised it came out fitting the data as well as it did.
However, you want to recognize the HUGE limits on the parameters, especially c2 and k12. That suggests the model can easily tradeoff variation in one of the parameters for a corresponding increase or decrease in the other.
This is a virtue of using a tool like the curve fitting toolbox, instead of fminsearch. Besides being easy to use, it also yields some information about the result that would not have been obvious if you just threw it at a tool like fminsearch.