CLsqFit:GetNumPtsUsed CLsqFit:GetNumPtsDeleted

CLsqFit:GetNumPtsRejected


The GetNumPtsRejected method returns the number of points rejected by the fit when data rejection is enabled.

Syntax

nPts = CLsqFit:GetNumPtsRejected( nChannel* )

n1, n2, n3, n4 = CLsqFit:GetNumPtsRejected()

Example

The following script fits a 2x2 polynomial with data rejection enabled, then retrieves the number of points rejected by the fit..

L = CLsqFit:new()

-- create a CLsqFit object

L:SetNumCoefs( {2.2} )

-- set 2x2 coefficients to fit a warped plane

L:AddPt( {3, 5}, 5.15 )

-- add a point with x = 3, y = 5, z = 5.15

 

-- add more points

L:DoRejection( true )

-- enable bad data rejection

L:Fit()

-- Fit the polynomial

nU = L:GetNumPtsUsed()

-- number of points used

nR = L:GetNumPtsRejected()

-- number of points rejected

Printf( "nUsed=%d, nRej= %d\n", nU, nR )

-- list the number used and number rejected

Related Topics

CLsqFit class, GetNumPts GetNumPtsUsed, GetNumPtsDeleted, Data Rejection