AddCustomFitDefinition Method
The AddCustomFitDefinition method adds a user-defined fit type to the application.
Syntax
object.AddCustomFitDefinition( name, equation, parameterList, initialValues, minimums, maximums )
Parameter | Type | Description |
name | string | required |
equation | string | required |
parameterList | string array | optional |
initialValues | Double array | optional |
minimums | Double array | optional |
maximums | Double array | optional |
Example
This example shows how to create a custom fit.
'Create arrays for custom fit parameters
Dim parameters(2) As String
parameters(0) = "m"
parameters(1) = "b"
Dim initialValues(2) As Double
initialValues(0) = 0
initialValues(1) = 0
Dim minimums(2) As Double
minimums(0) = -1.79769e+308
minimums(1) = -1.79769e+308
Dim maximums(2) As Double
maximums(0) = 1.79769e+308
maximums(1) = 1.79769e+308
'Create the custom fit
Grapher.AddCustomFitDefinition("Custom Fit", "Y = m*x+b", parameters, initialValues, minimums, maximums)
Used by: Application object