CLsqFit:GetNumPtsUsed
The GetNumPtsUsed method returns the number of points used in computing the fit. This number ignores points that were deleted or rejected from the total number of points added to the sample.
nPts = CLsqFit:GetNumPtsUsed( nChannel* ) n1, n2, n3, n4 = CLsqFit:GetNumPtsUsed() |
The following script fits a 2x2 polynomial with data rejection enabled, then retrieves the number of points used in the fit.
|
-- create a CLsqFit object |
|
-- set 2x2 coefficients to fit a warped plane |
|
-- add a point with x = 3, y = 5, z = 5.15 |
|
-- add more points |
|
-- enable bad data rejection |
|
-- Fit the polynomial |
|
-- number of points used |
|
-- number of points rejected |
|
-- list the number used and number rejected |
CLsqFit class, GetNumPts, GetNumPtsRejected, GetNumPtsDeleted, DoRejection, Data Rejection