CLsqFit:GetRangeX
The GetRangeX method returns the minimum and maximum values of the independent variable in the sample.
nMinX,nMaxX = CLsqFit:GetRangeX() nMinX,nMaxX = CLsqFit:GetRangeX( nDimension ) |
nDimension is an optional parameter that specifies the basis dimension (index of the independent variable) when the fit involves more than 1 basis dimension.
nMinX and nMaxX are the minimum and maximum values, respectively.
This method returns the limiting values of 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 |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.