       Fittings 2 sets of equations and 2 data sets with nonlinearmodelfit

• To: mathgroup at smc.vnet.net
• Subject: [mg121691] Fittings 2 sets of equations and 2 data sets with nonlinearmodelfit
• From: JamesE <haywanlar at excite.com>
• Date: Mon, 26 Sep 2011 04:14:15 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com

```Hi,

My names is James Ellison; and I have 2 nonlinear equations of the type:

y=x+a*x^2+b*x^3 and y=a*x^3+b*x^5 with the real valued parameters a and b for both equations.

I further have 2 data sets

data for y and
data for y

I can use NonlinearModelFit in order to fit each data[i] set to its function y[i] and get good fits. But the parameters a and b should be the same.

How can I create a simple code with Mathematica, so that I can do a simultaneous fit resulting in the parameters a and b to be the same.

I am a Mathematica beginner and would be pleased, if someone could answer my question for beginners.

Best regards, James

> In:= data = {{1., 0.75}, {2., 0.89}, {3., 0.42}, {4., 0.99}, {5.,0.84}, {6., 0.34}, {7., 0.83}, {8., 0.93}, {9., 0.76}, {10.,0.11}};
> nlm = NonlinearModelFit[data, {Exp[a + b x^2], b< -1/2}, {{a, 0}, {b, -1}}, x]
>
> In:= nlm[{"ANOVATable", "ParameterConfidenceIntervalTable"}]

```

• Prev by Date: Re: Artistic impression of cloudy structures
• Next by Date: Re: A fast way to compare two vectors
• Previous by thread: Re: Integration error? Integrate[1/(x^3-1)]?
• Next by thread: Re: Fittings 2 sets of equations and 2 data sets with nonlinearmodelfit