CLsqFit:GetRangeObs
The GetRangeObs method returns the minimum and maximum values of the observations, or independent variable, in the data sample.
nMinY,nMaxY = CLsqFit:GetRangeObs() nMinY,nMaxY = CLsqFit:GetRangeObs( nChannel ) |
nChannel is an optional parameter that specifies the channel when using multi-channel data as from an RGB image. If the data have 1 dimension, you do not need to specify the channel.
nMinY and nMaxY are the minimum and maximum values, respectively.
This method returns the limiting values of the observations (or "y" values for a fit to 1 basis dimension), in the sample data. If the data have multiple channels, you must specify which channel to return.
The following example returns the minimum and maximum y ("observation") values in the data:
|
-- create a CLsqFit object |
|
-- set 2 coefficients |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Fit the line |
|
-- find the range of x values |
|
-- Result: 2, 70 |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.