CLsqFit:UndeletePt
The UndeletePt method restores the status of a point that was deleted. The new status is "Use", meaning that the point will be used in subsequent fits.
CLsqFit:UndeletePt( nIndex, nChannel* ) |
This methods works like the SetPtStatus method with status = "Use" except that this method only restores the point if it was deleted. Points that are rejected are not restored. When a fit is run using Fit, all rejected points are initialized to "Use" status do they can participate in the data rejection process.
The following example illustrates how to restore a delete point. In this case, the target point's index is found by matching its values:
L = CLsqFit:new() |
-- create a CLsqFit object |
L:SetNumCoefs( 2 ) |
-- set 2 coefficients |
|
-- add a point for x = 3.5 and y = 5.15 |
|
-- add more points |
|
-- find the point (if we don't know it has index 1) |
|
-- delete the point |
L:Fit() |
-- Fit the line to remaining points |
|
-- do something with the fit results |
|
-- restore the point |
L:Fit() |
-- get a new fit result using the point |