new_lsqfit
The new_lsqfit is a non-class version of the CLsqFit:new method which creates and returns a newa CLsqFit object.
L = new_lsqfit()
L is returned as the new CLsqFit object.
On failure, nil is returned.
The new CLsqFit object is initialized with the following default properties:
The n-dimensional polynomial basis function 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.
The following script creates a CLsqFit object, adds some data, and performs a fit. Since SetBasisFunc is not used, a polynomial function is assumed.
|
-- create 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 |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.