CLsqFit:GetNumChannels
The GetNumChannels method returns the number of channels being fit. The number of channels defaults to 1 unless SetNumChannels was called before adding the sample points.
| 
 nChannels = CLsqFit:GetNumChannels()  | 
    nChannels is the number of channels to use,
in the range 1 to 4.
The GetNumChannels method fetches the number of channels used by the point values. The number of channels either defaults to 1 for numeric data, or was set using the SetNumChannels method. The number of channels is in the range 1 through 4.
The following script sets 3 channels, adds data points, and fetches the number of channels in use:
| 
 | 
 -- create a CLsqFit object  | 
| 
 | 
 -- specify 3 channel data  | 
| 
 | 
 -- add a point for x = 3.5 and y = "5,240.4,140"  | 
| 
 -- add more points to the fit  | 
 
  | 
| 
 | 
 -- compute the fit  | 
| 
 | 
 -- get the number of channels in use  | 
| 
 | 
 -- result: nChan= 3  | 
The next example does not call SetNumChannels, so the default number of channels, 1, is used. The script adds data points and then fetches the number of channels in use:
| 
 | 
 -- create a CLsqFit object  | 
| 
 | 
 -- add a point for x = 3.5 and y = 12.25  | 
| 
 -- add more points to the fit  | 
 
  | 
| 
 | 
 -- compute the fit  | 
| 
 | 
 -- get the number of channels in use  | 
| 
 | 
 -- result: nChan= 1  | 
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.