CLsqFit:ResetPoints
The ResetPoints method deletes all sample points from the fit. In contrast, the delete method deletes the entire CLsqFit object. Use ResetPoints if you want to add all new sample points but retain the other properties of the existing CLsqFit object.
CLsqFit:ResetPoints() |
After using ResetPoints, you must re-build the sample point collection using AddPt or AddPtWt. If you instead used the delete method to remove all the sample points, you would have to create a new CLsqFit object and then setup the basis function, number of channels, number of coefficients, forced coefficients, etc.
The following example accumulates sample points and computes a fit, then deletes all points, accumulates a new sample points, and computes a fit to the new data:
|
-- create a CLsqFit object |
|
-- fit 2x2 coefs to a polynomial |
|
-- add some points |
|
|
|
-- add more points |
|
-- do the fit |
|
-- do something with the fit results |
|
-- get rid of all points |
|
-- add some new points |
|
|
|
-- add more points |
|
-- do a new fit |