CLsqFit:GetRangeX
The GetRangeX method returns the minimum and maximum values of the independent variable in the sample.
nMinX,nMaxX = CLsqFit:GetRangeX( nDimension* ) |
This method returns the limiting values in the sample data for the specified dimension. If the data have only 1 dimension, such as "x", you do not need to specify the dimension.
The following example returns the minimum and maximum x values in the data for fitting 1 independent variable, x:
|
-- create a CLsqFit object |
|
-- set 2 coefficients |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Fit the line |
|
-- find the minimum and maximum x values |
|
-- Result: -4.5, 18.7 |