CLsqFit:GetBasisFunc
The GetBasisFunc method returns the basis function currently registered with the CLsqFit object. The basis function is either the default built-in n-dimensional polynomial or a function that was set using the SetBasisFunc method.
sName = CLsqFit:GetBasisFunc() |
sName is a string that identifies the basis function in use. See Remarks.
This function returns a string with the following values:
1 |
The built-in (default) n-dimensional polynomial basis function. |
2 |
The built-in Hyperplane basis function. |
(else) |
The name of a basis function defined in the script. |
The following script retrieves the name of the basis function in use. In this example, no function is registered using SetBasisFunc, so the built-in n-dimensional polynomial is used by default.
|
-- create a CLsqFit object |
|
-- no function declared, n-Dimensional polynomial (1) used. |
|
-- fetch the name of the basis function |
|
-- result: Func= '1' |
The next example defines a basis function in the script and registers it, The name of the basis function is then fetched and listed.
|
-- declare a basis function to fit a line |
|
|
|
|
|
|
|
|
|
-- end of basis function |
|
|
|
-- create a CLsqFit object |
|
-- register the basis function |
|
-- fetch the name of the basis function |
|
-- result: Func= 'MyFunc' |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.