Re: Nonlinear fit for a non-differentiable function
- To: mathgroup at smc.vnet.net
- Subject: [mg43164] Re: Nonlinear fit for a non-differentiable function
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Fri, 15 Aug 2003 04:27:10 -0400 (EDT)
- References: <bhd94f$rn9$1@smc.vnet.net>
- Reply-to: "Allan Hayes" <hay at haystack.demon.co.uk>
- 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: > NonlinearRegress::"unevldr": "One or more derivatives of the model with \ > respect to parameters did not evaluate." > I shall be grateful if someone could suggest a way around this problem. > Thanks > Sayeed > > > ********************************************************* > Office Adress: > Ahmed Sayeed > Technische Physik II/Polymerphysik > Gebäude 5 > Unterpörlitzer Strasse 38 > 98684 Ilmenau > Telephone: +49 3677693674 / +49 3677693176 > Germany > > Home Address > Apt. Nr. 15 > Hohe Strasse 2E > 98693 Unterpörlitz-Ilmnenau > Germany > ************************************************************** > Ahmed, If you have version 5 you might find looking up NMinimize in the HelpBrowser useful, particularly the note "Finding a Nonlinear Fit of Data" in "FurtherExamples" and the note on NelderMead in "AdvancedDocumentation" (for non-differentiable models). Allan --------------- Allan Hayes hay at haystack.demon.co.uk Voice: +44 (0)116 241 8747 Fax: +44 (0)870 164 0565