MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

AW: Mathematica question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8139] AW: [mg8111] Mathematica question
  • From: Buttgereit <Buttgereit at compuserve.com>
  • Date: Fri, 15 Aug 1997 23:41:50 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Julia,
if you want to fit a exponential model - which is nonlinear  - you have t=
o
use NonlinearFit from the Statistics packages:

<<Statistics`NonlinearFit`

will load this package.
You will get your fit using:

NonlinearFit[ data, model, vars, params ]

Say, you have the model: =


y=3D k exp( a t - dt) =


and your data are a list of tuples of one variable and the response

data=3D{ {t1, y1},{t2,y2}, ...,{tn,yn}}; =


then you put in

NonlinearFit[ data, k Exp[a t - dt],
t,{{k,startingvalue},{a,startingvalue},{dt,startingvalue}}]

If this does not work, try better starting values.

In Version 2.2.x you will get as result a list of replacement rules, say

{k->1.2, a->0.1, dt->.002}

You can insert this result in your model by

k Exp[a t - dt]/.{k->1.2, a->0.1, dt->.002}

to get

1.2 Exp[0.1 t - 0.002]

in this example. Version 3 will immediatly put in the computed values for=

your parameters.

If you have access to V.3 have a look at the help browser. You will find
more examples and basics concerning checking the quality of the fit there=
=2E

Good luck,
Peter

----------
Von:    INTERNET:MEINERSH at CV3.CHEM.PURDUE.EDU[:]
Gesendet:       Dienstag, 12. August 1997 08:34
An:     INTERNET:mathgroup at smc.vnet.net
Betreff:        [mg8111] Mathematica question

        by hil-img-6.compuserve.com (8.8.6/8.8.6/2.3) with SMTP id
CAA22083;
        Tue, 12 Aug 1997 02:34:13 -0400 (EDT)
        id AAA16888; Tue, 12 Aug 1997 00:54:52 -0400
        id AAA16882; Tue, 12 Aug 1997 00:54:51 -0400
From: MEINERSH at CV3.CHEM.PURDUE.EDU
To: mathgroup at smc.vnet.net
Subject: [mg8139] [mg8111] Mathematica question

Hello,
  I am a beginner Mathematica user and am having a bit of trouble with a
curve fit.  I'm sorry to bother you, but when I try to get into the
archives our computer doesn't seem to like it.
  I am trying to fit a fluorescence lifetime decay that is at least a
double exponential.  I am really confused when following the curve fit
section of the manuel and have tried a few things but with no success.  I=

would appreciate if you could give me a few hints or insight to curve
fitting.
  Thank you for your time,
  Julia Meinershagen




  • Prev by Date: Integral sign size & position
  • Next by Date: Re: Procedure to Function
  • Previous by thread: Integral sign size & position
  • Next by thread: Re: Procedure to Function