Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2012

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

Search the Archive

Fitting a Complicated Function

  • To: mathgroup at
  • Subject: [mg127226] Fitting a Complicated Function
  • From: mpdgeorgin at
  • Date: Tue, 10 Jul 2012 00:40:30 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

I'm trying to fit a very complicated function and I'm having some problems.

Right now I'm trying to do a Constrained fit where my parameters are R,m,a.  

FindFit[data, { 
  Exp[-x/R] + 
    Sum[((-a*x^(1 - m))^n)*
      Hypergeometric1F1[-m*n, 1 + n - m*n, x/R]/
       Gamma[1 + n - m*n], {n, 1, 15}], 1 < R < 30, 
  0 < a < .5, .4 < m < 1}, {R, m, a}, x]

The error that appears is :

Power:infy : infinite expression
FindFit:nrmnum : the function value Indeterminate is not a real number at{R,m,a} = {2, 0.94, 0.45}

This is strange because I can evaluate the function at these values and it gives me a real, finite result.

I have a couple questions: 

1) Is there a way to check what the Find fit function is actually doing? As in can I look at the code to see exactly where its going wrong.

2) What should my next step be? according to my PI, simplification of the function doesn't lead anywhere.



  • Prev by Date: Re: List(Line)Plot in a 2D or 3D self defined coordinate system
  • Next by Date: Sending an interrupt to the frontend?
  • Previous by thread: Re: List(Line)Plot in a 2D or 3D self defined coordinate system
  • Next by thread: Re: Fitting a Complicated Function