MathGroup Archive 2005

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

Search the Archive

Fitting numerical data

  • To: mathgroup at
  • Subject: [mg62022] Fitting numerical data
  • From: Tomek <rtomek at>
  • Date: Wed, 9 Nov 2005 03:45:48 -0500 (EST)
  • Sender: owner-wri-mathgroup at

I am trying to find a best fit of my data to a function, which is a solution of a partial differential equation integrated over one of the variables:

SOLN = Function[{p, avg}, 
sol = NDSolve[D[u[r,t],t]... <diff equation>]; 
NIntegrate[Evaluate[First[u[r,t] /. sol]], {r, rmin, rmax}]/. t-> p]

When I compute the values at certain points for SOLN, everything works fine, but when I try to use FindFit to actually find the fit of the data:

FindFit[data, a*SOLN[t, av], {a, av}, t]

it fails with 'Unable to solve for the fit paramters; the design matrix is non-rectangular, non-numberical or could not be inverted.'. 

The data provided allows for unique solution of the a,av paramters. Is it possible to solve those type of functions with FindFit. How to go around doing that?


  • Prev by Date: Re: Re: Re: Use of Mathematica with Rule-based Equation Derivations
  • Next by Date: Re: Bug in pattern parsing?
  • Previous by thread: Re: Reals and Equal
  • Next by thread: Re: Fitting numerical data