CLsqFit:DeletePt
The DeletePt method sets the status of an existing point to "Del", meaning that the point is deleted and will not be used in the fit. You can later restore the point using the UndeletePt method.
CLsqFit:DeletePt( nIndex ) CLsqFit:DeletePt( nIndex, nChannel ) |
nIndex is the index of the point.
nChannel is an optional parameter which specifies the channel to delete. If omitted, all channels are deleted.
The following example illustrates how to change the weight of an existing 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 |
|
|
-- Fit the line to all points |
-- do something with the fit results |
|
|
-- find the point (if we don't know it has index 1) |
|
-- delete the point |
|
-- get a new fit result without the point |
CLsqFit class, UndeletePt, SetPtStatus, AddPt
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.