Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

FNLSQ in IMSL library

jjgenglergmail_com
558 Views
I want to perform nonlinear least squares. In particular, I want to fit data to a double exponential function of the form y(x) = A*exp(B*x)+C*exp(D*x) where A,B,C, and D can be determined. The routine FNLSQ seems the most appropriate, but the example given makes it appear that this routine cannot do what I want. Is this fitting possible with FNLSQ, or is there a better routine to use?
0 Kudos
1 Reply
ArturGuzik
Valued Contributor I
558 Views
I want to perform nonlinear least squares. In particular, I want to fit data to a double exponential function of the form y(x) = A*exp(B*x)+C*exp(D*x) where A,B,C, and D can be determined. The routine FNLSQ seems the most appropriate, but the example given makes it appear that this routine cannot do what I want. Is this fitting possible with FNLSQ, or is there a better routine to use?
Hi,

the routine should be OK. It uses finite difference approximation for obtaining Jacobian entries. For non-linear LS the most reliable and robust approach is to use Levenberg-Marquardt algorithm. The library offers it in BCLSJ routine which requires user-supplied Jacobian, which you obviously have at hand (as you know your function).

A.
0 Kudos
Reply