CLsqFit:new
The new method constructs a new instance of a CLsqFit object. You must call this method before using the class.
L = CLsqFit:new()
|
The CLsqFit object is initialized with the following default properties:
The following script creates a CLsqFit object, specifies a line is to be fit using 2 coefficients, adds data and does a fit. The CLsqFit object is deleted when done in order to conserve memory use.
|
-- 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 |