CLsqFit:new
The new method constructs a new instance of a CLsqFit object. You must call this method before using the class. Note that the object can also be created using new_lsqfit.
L = CLsqFit:new() Creates a default CLsqFit object and returns it as L. L is the new instance of the CLsqFit class. |
The new CLsqFit object is initialized with the following default properties:
n-dimensional polynomial basis function selected. See SetBasisFunc.
1 data channel. See SetNumChannels.
0 coefficients specified. See SetNumCoefs.
0 sample points added. See AddPt and AddPtWt.
Thefollowing script creates a CLsqFit object, adds some data, and performs a fit. Since SetBasisFunc is not used, a polynomial function is assumed.
|
-- create a CLsqFit object |
|
-- set 2 coefficients |
|
-- add a point for x = 3.5, y = 5.15 |
|
-- add a point |
|
-- add a point |
|
-- Fit the line |
|
-- do something with the results |
|
-- best delete from memory when you are finished |
CLsqFit class, delete, new_lsqfit
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.