The Fitting Function Organizer

There are two major parts to the Fitting Function Organizer: the upper control panel and the lower preview panel. Click the Show/Hide Previews buttonsButton Expand Preview Down.pngButton Expand Preview Up.png to show or hide the lower panel.

The Fitting Function Organizer dialog box new.png
  • The upper panel can be divided into three parts: the left one lists the function categories; the middle one is the main panel for editing functions; and the right one contains the button controls.
  • The lower panel contains three tabs: The Equation and Sample Curve tabs show you the equations and sample curves (available only for built-in functions ); the Hints tab provides helpful hints for using the active control.

Please read these topics for more information on built-in and user-defined fitting functions:

Function Category Controls

The left side of the upper panel lists functions by category. Expand a branch to display related functions and select individual functions to modify, duplicate or delete. User-defined categories and functions are displayed below built-in functions.

Edit Function Controls

Function Name

Specify the function name.

File Name (.FDF)

Path and name of the function definition (.FDF) file.

Brief Description

Enter a brief description of the function.

Function Model

Choose either Explicit or Implicit for the function model. Note that the two function models will lead to different options below.

Function Type

Choose either User-Defined or External DLL for the function type.


Creating a User-Defined Fitting Function
Using External DLLs
Independent Variables

Enter independent variable names, separated by a comma. Only available when function model is set to Explicit.

Dependent Variables

Enter dependent variable names, separated by a comma. Only available when function model is set to Explicit.


Enter independent variable names, separated by a comma. Only available when function model is set to Implicit.

Formula Numbers

Enter or choose the number of f formula here. Only available when function model is set to Implicit.


Show the formula names automatically generated from Formula Numbers.Only available when function model is set to Implicit.

Parameter Names

Enter dependent parameter names, separated by a comma.

Function Form

Select a function form.


Defining a Peak Function
Treat All Numbers as Double This check box is available when OriginC has been selected in the Name and Type page. When Treat All Numbers as Double is selected, all numbers are treated as double precision types. For example, when selected, “1/2” returns as “0.5”. When not selected, “1/2” returns as “0”.
Derivatives This is only available when Origin C or Y-Script has been selected in the Function Form drop-down list. Select to specify expressions for derivatives for all parameters. Specifying derivative expressions can increase fitting speed. Use "dy_VarName" to represent the derivative variables.


Specifying Partial Derivative of Parameters
Peak Function

Specify whether this function can be used in the Peak Analyzer.


Defining a Peak Function

Define the function.


Creating a User-Defined Fitting Function
Parameter Settings

Click the Parameter Settings button to the right of the edit box or edit directly in the edit box to specify parameter settings (e.g., bounds, initial values, Fix/Vary status, refer to Bounds and Constraints for details).

The Parameter Settings dialog is also capable of initializing parameters by initial formula (column statistics values, label rows, .etc), by selecting the check box in Initial Formula column and then clicking the triangle button in each parameter cell to select the desired initial formula for that parameter.

Enable Auto Initialization

Enable or disable the parameters initialization code specified in the Parameter Initialization edit box. Note that if this box is checked, the initial values for the parameters will be set according to the parameter initialization code, even if initial values have alredy been set in Parameter Settings.

Allow Initialization Fixed Parameters

Select this checkbox to enable the parameters initialization code even if the parameters are fixed.

Use LabTalk/Use Origin C

When you create a new function, Use Origin C radio button is selected by default. When selected, parameter initialization code must be defined using Origin C. This option optimizes parameter initialization.

When Use LabTalk radio button is cleared, the parameter initialization code is interpreted as LabTalk script.

Parameter Initialization

Edit the parameter initialization code here.


Parameter Initialization
Enable Constraints

Use this check box to enable or disable the constraints specified in Constraints edit box. Only available when function model is set to Explicit.

Script Before Fitting LabTalk Scripts that will be executed before the fitting session begins. Note that the script in this text box are executed before any scripts in the Parameter Initializations dialog box.
Script After Fitting LabTalk Scripts that will be executed after the fitting session ends. For example, if you want the fitting results to be displayed or stored in a particular manner, write a script which performs the task and enter it in this text box.
Constants Define constants here. These constants can be used in the fitting function body and the parameter initialization code. Separate these variables by semicolon (;) when there are multiple constants. For example:
c1 = 20;
c2 = -3.5;

Note: Parameter names, derived parameter names, and system variable names should not be used as constant names.


Specify general linear constraints for the fit parameters. Only available when function model is set to Explicit.


Bounds and Constraints
Derived Parameters

Define the derived parameters. These additional parameters are computed at the end of the fitting session, using the resultant fit parameter values.

Defining Derived Parameters
Derived Parameter Settings

Set unit for the derived parameters using the equation. Example: Unit=aa, bb, cc.

Button Controls


Save the defined function.

New Category

Create a new function category.

New Function

Create a new fitting function.

Buider Click this button to create or edit a user-defined fitting function from Fitting Function Builder.

Duplicate the selected function and automatically rename it by prefixing "CopyOf" to the original function name.


Add a new function by copying a .FDF to the function folder.


Remove a function.


Close the Fitting Function Organizer and discard unsaved changes to the fitting function.


Save the function (or function edits) and close the Fitting Function Organizer.


Simulate the curve. If you are not sure what your curve looks like, you can use this feature to simulate a sample curve. When a surface function is selected, this button will open the Simulate Surface dialog box.

See: Documentation for the simcurve X-Function.


Restore the built-in fitting function's default settings.


Open the Search and Insert Functions dialog to search an existing fitting function.