MathGroup Archive 2003

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

Search the Archive

Re: Nonlinear fit for a non-differentiable function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43149] Re: Nonlinear fit for a non-differentiable function
  • From: "Bill Bertram" <wkb at aansto.gov.au>
  • Date: Thu, 14 Aug 2003 05:08:07 -0400 (EDT)
  • Organization: Australian Nuclear Science and Technology Organisation
  • References: <bhd94f$rn9$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Ahmed Sayeed" <Ahmed.Sayeed at Tu-Ilmenau.De> wrote in message
news:bhd94f$rn9$1 at smc.vnet.net...
> Hello friends,
>    I have to carry out a nonlinear fit where the fit function is
non-differentiable w.r.t. one or
> more of the parameters, because I have to take the absolute value in the
definition of the function.
> For example, f[x_,a_,b_]:=a*Sin[Abs[b]*x], where a and b are fit
parameters.  NonlinearRegress
> fails, giving the following message:

Hello Ahmed,

My solution to this kind of problem, which has worked for me, is to replace
the variable by its square.
Instead of   f[x_,a_,b_]:=a*Sin[Abs[b]*x] you now fit the function
f[x_,a_,c_]:=a*Sin[c^2 * x] .

Cheers,
  Bill



  • Prev by Date: Re: [newbie] can't get the answer
  • Next by Date: Re: [newbie] can't get the answer
  • Previous by thread: Nonlinear fit for a non-differentiable function
  • Next by thread: Re: Nonlinear fit for a non-differentiable function