CLsqFit:GetNumPtsDeleted


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

Syntax

nPts = CLsqFit:GetNumPtsDeleted()

nPts = CLsqFit:GetNumPtsDeleted( nChannel )

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

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

bullet.gif    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 = new_lsqfit()

-- 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 to the fit

 

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

CLsqFit class, GetNumPts, GetNumPtsRejected, GetNumPtsUsed, DeletePt, Data Rejection


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.