CLsqFit:GetErrChan
The GetErrChan method returns the channel at which a fit error occurred. If Fit returns false, use this method along with GetErrMsg to obtain error information.
nChannel = CLsqFit:GetErrChan() |
nChannel is a number indicating the channel where the error occurred.
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 |
-- you forgot to add points to the fit |
|
|
-- 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 |
CLsqFit class, GetErrMsg, DoFit, Sprintf
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.