CLsqFit:GetRetCode
The GetRetCode method returns a numeric code that identifies the status of the least squares fit. If a value other than 1 is returned, use GetErrMsg to obtain the error information. In general the return code will be less than 0 if an error occurred.
nRetCode = CLsqFit:GetRetCode() |
nRetCode is a number corresponding to the status of the fit.
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.
|
-- create a CLsqFit object |
|
-- specify the number of coefficients |
-- example: you forgot to add points to the fit |
|
|
-- do the fit |
|
-- test whether the fit succeeded |
|
-- get the error code |
|
|
|
-- get the error message |
|
-- exit the script and list the message |
|
|
|
|
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.