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 ) CLsqFit:UndeletePt( nIndex, nChannel ) |
nIndex is the index of the point.
nChannel is an optional parameter which specifies the channel of the point being restored. If omitted, all channels are restored.
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:
|
-- create a CLsqFit object |
|
-- set 2 coefficients |
|
-- add a point for x = 3.5 and y = 5.15 |
-- add more points to the fit |
|
|
-- find the point (if we don't know it has index 1) |
|
-- delete the point |
|
-- Fit the line to remaining points |
-- do something with the fit results |
|
|
-- restore the point |
|
-- get a new fit result using the point |
CLsqFit class, DeletePt, SetPtStatus, AddPt
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.