The Function Body Page

On this page, you can input the function body, and set initial values for parameters and constants. These parameter settings can be modified in the Nonlinear Fit dialog. If your fitting includes integration, you can use this page to map fitting variables and parameters with the elements of the integrand.

Dialog Box Controls

Parameters Tab This tab contains several columns for setting initial parameter values. All settings can be modified in the Nonlinear Fit dialog.
  • Param
    This is read-only, and displays the names of the parameters.
  • Unit
    Specify the units of the parameters.
  • Meaning
    Specify the meanings of the parameters.
  • Fixed
    Select this to fix a parameter.
  • Initial Value
    Set the initial values of the parameters.
  • Peak Attribute
    This is available only when the Peak Function check box has been selected on the Variables and Parameters Page. For peak functions, the peak attribute for the first y0 parameter should be set to Offset/Baseline. You must also assign the peak attributes of center, width, and amplitude/area to at least three other parameters.
Constants Tab Constants are fixed values that can be used either in the function expression or in parameter initialization code. You should enter a value for a constant in the Value column if you have defined it in the previous page.
Integrand Tab This is only available when Include Integration During Fitting is selected in the Name and Type page. In this tab, you can map the fitting variables and parameters with elements of the integrand, including lower limit, upper limit, and integrand arguments. After mapping the fitting variables, the corresponding expression for the integration will show at the top of this tab. Click the Insert button to insert this expression into the Function Body text box.
Function Body The Name and Type page lists five function types, each with its own function body format. To ensure that the fitting function is correctly formatted, follow the hints in the left panel, or read the instructions on the Name and Type page. Note that when function model is implicit, it is required to write the function body as f=g(x,y) instead of 0=g(x,y), where f is the estimate.
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”.
Use Derivatives This is only available when OriginC has been selected in the Name and Type page. Select this check box to specify expressions for derivatives for all parameters. Specifying derivative expressions can increase the speed of fitting. Use d_VarName to represent the derivative variables.


Specifying Partial Derivative of Parameters
Open Code Builder Button Ffb open codebuilder.png This is only available when OriginC has been selected in the Name and Type page. Click the button to edit the function body in Code Builder. For more details, please refer to Editing the Function in Code Builder.
Quick Check Use Quick Check to check the validity of a function. Enter parameter values in the Initial Value column in the table, and then enter values for independent variables in the edit box. Press the Ffb evaluate.png button to view the output values of dependent variables.

If there are errors in your function body, or if you specified inappropriate input values for parameters or variables, the output box will display a missing value and an appropriate error message.

Quickly modify Parameters and/or Constants

Right click on the table box area of the Parameters tab/Constants tab to bring up the context menu.

  • Add: Add a new row in the table.
  • Rename...: Only available when the mouse cursor focuses on certain row. It will open the Parameter Renaming (in the Parameters tab) or Constant Renaming (in the Constants tab) dialog to change the name of the intended Parameter/Constant.
  • Delete: Delete a row of the table. Note that this option in the Parameters tab is not available when there is only one parameter left.