Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: damped oscilations data fit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70616] Re: damped oscilations data fit
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 21 Oct 2006 05:14:06 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <eh4ntl$7sb$1@smc.vnet.net> <eh7931$dig$1@smc.vnet.net> <eha4vs$b1b$1@smc.vnet.net>

Hi Roger,

the physical time dependence of a damped 
oscillator
*is*

Exp[-lambda*t]*(c1*Sin[omega*t]+c2*Cos[omega*t])

and I would like to see what differential 
equation/force law
you are using to get
model=a*Exp[-w^2*t^2]+b*Sin[w*t]+c

And even when you model perfectly fit to the data, 
I would prefer
a model that can justifyed by physical laws and 
fit not so well...

Regards
  Jens

"Roger Bagula" <rlbagula at sbcglobal.net> schrieb im 
Newsbeitrag news:eha4vs$b1b$1 at smc.vnet.net...
| Jens-Peer Kuska wrote:
|
| >Hi,
| >
| >model = Exp[-l*t]*Sin[w*t + phi] + c;
| >ff = FindFit[N[data], model, {{l, 1/1000}, {w,
| >1/400}, {phi, 0}, {c, 60}}, t]
| >
| >Plot[Evaluate[model /. ff], {t, 0, 1014},
| >PlotRange -> All,
| >Epilog -> {Point /@ data}]
| >
| >Regards
| >  Jens
| >
| >
| >|
| >
| >
| >
| >
| Jens-Peer Kuska,
| Your mechanics work fine here, but a better 
model seems to be an
| Gaussian decay
| instead of an exponential one:
| model=a*Exp[-w^2*t^2]+b*Sin[w*t]+c
| Roger
| a = {{0, 54}, {120, 56.5}, {230, 56}, {305, 54}, 
{340,
|     53}, {360, 52.7}, {378, 52.5}, {
|      405, 52.5}, {443, 53}, {480, 53.5}, {510, 
54}, {540, 54.7}, {570,
| 54.4}, {602, 56}, {643, 56.5}, {660, 56.5}, {
|    685, 56.25}, {706, 56}, {727, 55.25}, {743, 
55.5}, {756, 55.25}, {775,
|     55}, {787, 54.75}, {799, 54.5}, {814, 
54.25}, {828, 54}, {845,
| 53.75}, {
|    858, 53.5}, {877, 53.25}, {894, 53}, {923, 
52}, {951,
|     53}, {983, 53.5}, {1014, 54}}
| g = ListPlot[a, PlotJoined -> True]
| y[x_] = Fit[a, {1, Exp[-x^2/89^2], Sin[x/89]}, 
x]
| g1 = Plot[y[x], {x, 0, 1050}]
| Show[{g, g1}]
|
| data = {{0, 54}, {120, 56.5}, {230, 56}, {305,
|       54}, {340, 53}, {360, 52.7}, {378, 52.5}, 
{405, 52.5}, {
|    443, 53}, {480, 53.5}, {510, 54}, {540, 
54.7}, {
|    570, 54.4}, {602, 56}, {643, 56.5}, {660, 
56.5}, {685, 56.25}, {
|      706, 56}, {
|    727, 55.25}, {743, 55.5}, {756, 55.25}, {775, 
55}, {787, 54.75}, {799, \
| 54.5}, {814, 54.25}, {828, 54}, {845, 53.75}, 
{858,
|     53.5}, {877, 53.25}, {894, 53}, {923,
|       52}, {951, 53}, {983, 53.5}, {1014, 54}}
| model = Exp[-(w*t + phi)^2] + l*Sin[w*t + phi] + 
c;
| ff = FindFit[N[data], model, {{l, 1/1000}, {w,
| 1/400}, {phi, 0}, {c, 60}}, t]
| g1 = Plot[Evaluate[model /. ff], {t, 0, 1014},
| Epilog -> {Point /@ data}]
| g = ListPlot[data, PlotJoined -> True]
| Show[{g, g1}]
| 



  • Prev by Date: Re: making random matrix
  • Next by Date: Re: Programming style: postfix/prefix vs. functional
  • Previous by thread: Re: damped oscilations data fit
  • Next by thread: General--Mathematica is unable to yield result from LinearSolve with good Preci