CLsqFit:GetErrMsg
The GetErrMsg method returns a message describing the error in the least squares fit. If Fit returns false, use this method along with GetErrChan to obtain error information.
sMsg = CLsqFit:GetErrMsg() |
The following script configures the fit but forgets to add any data points. After the fit fails, the script prints an error message and exits.
L = CLsqFit:new() |
-- create a CLsqFit object |
|
-- specify the number of coefficients |
|
-- forget to add data points |
|
-- do the fit |
|
-- test whether the fit succeeded |
|
-- get the error channel |
|
-- get the error message |
|
-- exit the script and list the error message |
|
-- end of test block |