CLsqFit:GetNumPtsDeleted


The GetNumPtsDeleted method returns the number of points that were manually deleted form the sample.

Syntax

nPts = CLsqFit:GetNumPtsDeleted( nChannel* )

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

where

    nChannel is an optional argument that specifies the channel for multi-channel (RGB) data.

    nPts, n1, n2, n3, and n4 are the number of points deleted from all channels when nChannel is not specified.

Example

The following script fits a 2x2 polynomial with data rejection enabled, then retrieves the number of points deleted and rejected from 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:DeletePt ( 2 )

-- manually delete the 2nd point

L:DoRejection( true )

-- enable bad data rejection

L:Fit()

-- Fit the polynomial

nD = L:GetNumPtsDeleted()

-- number of points deleted

nR = L:GetNumPtsRejected()

-- number of points rejected

Printf( "nDel=%d, nRej= %d\n", nD, nR )

-- list number deleted and number rejected

Related Topics

GetNumPts

GetNumPtsRejected

GetNumPtsUsed

CLsqFit class