The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 NLFit algorithm
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

binowizu

16 Posts

Posted - 01/26/2026 :  1:16:54 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi everyone,
I am using the NLFit tool in OriginPro and I would like to better understand the underlying mechanics of the Levenberg-Marquardt algorithm implementation, specifically regarding the Jacobian matrix.
I have two questions concerning the calculation of derivatives:
- Built-in Functions: How does Origin handle the Jacobian for its library of built-in functions? Does it use analytical Jacobians (exact formulas) or is it based on a numerical approximation approach?
- User-Defined Functions (UDF): When a user creates a new fitting function, how is the Jacobian determined by the engine? I am interested to know if there is a default method (such as finite differences) and if there are options for the user to specify or influence how these derivatives are calculated to ensure better convergence.

Edited by - binowizu on 01/26/2026 1:23:52 PM

Sam Fang

294 Posts

Posted - 01/27/2026 :  12:27:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi binowizu,

1) For most built-in functions, Origin provides analytical Jacobians. For a few complex built-in functions, it uses a numerical approximation method.

2) For user-defined functions, if you want to provide analytical Jacobians, in Fitting Function Organizer dialog, you can choose Origin C Function Type, check Derivatives check box, in Function edit box, click Edit button on the right to open Code Builder, it will have more variables to define, e.g. dy_A0, dy_xc,... where dy_A0, dy_xc, ... are derivatives of y with respect to parameters A0 and xc. If you don't check Derivatives check box, Origin will use finite differences to calculate derivatives.

Thanks.
Sam

Sam
OriginLab Technical Services

Edited by - Sam Fang on 01/27/2026 12:30:00 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000