CLsqFit:GetStatus


The GetStatus method returns a number that gives the status of the least squares fit. If not 0, then you can retrieve error information using GetErrMsg and GetErrChan.

Syntax

nStatis = CLsqFit:GetStatus()

where

    nStatus is a number giving the status of the fit procedure.

Example

The following script fits a line to x and y tables of data. Following the fit, the script checks the status and takes action if the fit failed.

L = FitLine( x, y )

-- create a CLsqFit object

if L:GetStatus() ~= 0 then

-- test whether the fit succeeded

  Exit( Sprintf("LSQ Error: %s\n", L:GetErrMsg() ) )

-- exit the script with an error message

end

-- end of test block

Related Topics

FitLine

CLsqFit class