1
$\begingroup$
tab1={{0., 1.92308}, {7., 11.5385}, {14., 36.5385}, {21., 75.}, {27., 
  123.077}, {35., 300.}, {42., 330.769}}
tab2={{0., 0.}, {7., 3.41463}, {14., 7.80488}, {21., 17.561}, {27., 
  32.1951}, {35., 70.7317}, {42., 77.561}}

I want to fit it with the following differential equations. tab1 corresponds to nm[t] and tab2 to ns[t].

I'm using another fit which is the following :

macr = {{0.62`, 0.09`}, {2.41`, 0.27`}, {4.02`, 0.31`}, {5.69`, 
   0.4`}, {7.42`, 0.8`}, {9.16`, 1.33`}, {10.71`, 1.87`}, {12.51`, 
   2.76`}, {14.25`, 3.16`}, {15.92`, 3.91`}, {17.6`, 4.76`}, {19.34`, 
   5.56`}, {28.`, 16.01`}, {42.`, 17.14`}, {56.`, 19.03`}}
lmf = NonlinearModelFit[macr, 
  c*(1 + Tanh[(x - a)/b]), {{a, 25}, {b, 10}, {c, 7}}, x]
m[x_] = lmf[x + 14]

And here are the differential equations that I want to fit :

sol1 = NDSolve[{ns'[t] == 
    alpha*(n[t] - ns[t]*nm[t] )*(m[t] - ns[t])*g[t], 
   nm'[t] == 
    mm*m[t]*(n[t] - ns[t]*nm[t]) + 
     a*nm[t] + (-b*(nm[t] - nc) - a*nm[t] + 
        a*nm[t]^(2/3)*(nc^(1/3)))*(Tanh[(nm[t] - nc)*100] + 1), 
   g'[t] == e*m[t] - h*g[t], 
   n'[t] == ns'[t]*nm[t] + ns[t]*nm'[t] - d*(n[t] - nm[t]*ns[t]), 
   g[0] == 0, nm[0] == 0, ns[0] == 0, n[0] == 100}, {n, ns, nm, 
   g}, {t, 0, 60}]

The initial guess for the parameters I want to fit are the following :

alpha = 0.00005
mm = 0.002
a = 0.2
b = 0.2
d = 0.05
e = 10
f = 0.1
h = 0.01
nc = 222

This guess gives that result (not so great but not so far) :

enter image description here

So just to sum it up, there are 2 elements in my questions :

  1. How to fit simultaneously two data

  2. How to fit taking into account another unknown function, here $g[t]$ and $n[t]$.

Thank you in advance

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.