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:
The n-dimensional polynomial basis function is selected. See SetBasisFunc.
1 data channel. See SetNumChannels.
0 coefficients are specified. See SetNumCoefs.
0 sample points are added. See AddPt and AddPtWt.
Data rejection is disabled.
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 of the polynomial (line) |
|
-- 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 |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.