Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Global Fitting multiple nonlinear equations to multiple datasets.
Replies: 0

 Brandon Breitling Posts: 3 Registered: 6/20/13
Global Fitting multiple nonlinear equations to multiple datasets.
Posted: Jun 20, 2013 4:02 AM

Hi,
I have collected several time dependent data sets. At each time point
there are 5 observables (XHS, XHF, XO, X, and F) which can be described by
five equations (XHS(t), XHF(t), XO(t), X(t), and F(t)) These five
equations are related and depend on five parameters (k1,k2,k3,k4,k5). I
would like to globally fit the five data sets to the five equations to
extract the five parameters. I have fitted each of the curves individually
but would like to try a global fit but don't know how to do that. What I
have done so far is below which shows the fit for one equation with
NonlinearModelFit(I
have the other equations fitted too but its a lot of code):

XHS = Import["C:\\Users\\bbreitling\\Desktop\\XHS.csv"] ;
XHF = Import["C:\\Users\\bbreitling\\Desktop\\XHF.csv"] ;
XO = Import["C:\\Users\\bbreitling\\Desktop\\XO.csv"] ;
X = Import["C:\\Users\\bbreitling\\Desktop\\X.csv"] ;
F = Import["C:\\Users\\bbreitling\\Desktop\\F.csv"] ;

dataXHS = XHS[[11 ;; 19, All]];
dataXHF = XHF[[11 ;; 19, All]];
dataXO = XO[[11 ;; 19, All]];
dataX = X[[11 ;; 19, All]];
dataF = F[[11 ;; 19, All]];

XHSi = dataXHS[[1, 2]];
clear[k1];
nlmXHS = NonlinearModelFit[dataXHS, E^(-k1 t) XHSi, { {k1, .005}}, t];
dataplotXHS =
ListPlot[dataXHS, PlotStyle -> ColorData[1, 1],
PlotMarkers -> (Style["\[FilledCircle]"])];
fitplotXHS =
Plot[nlmXHS[t], {t, 0, 120}, PlotStyle -> ColorData[1, 1],
PlotRange -> {{0, 120}, {100, 0}}];