CStats:SdevClip
The SdevClip method computes the clipped Standard Deviation for the distribution of values in a data sample. Extreme values above the number nHigh of highest values and below nLow lowest values are excluded from the calculation. The sample may be a Lua table or a class object of type CImage, CArray, or CMatrix. For CImage and CMatrix objects, an optional CRect object can be used to define the points used in the calculation.
| nStdDev = CStats:SdevClip( table, nHigh, nLow ) nStdDev = CStats:SdevClip( CImage, nHigh, nLow ) nStdDev = CStats:SdevClip( CImage, nHigh, nLow, CRect ) nStdDev = CStats:SdevClip( CArray, nHigh, nLow ) nStdDev = CStats:SdevClip( CArray, nHigh, nLow, CRect ) nStdDev = CStats:SdevClip( CMatrix, nHigh, nLow ) where | 
 table is a lua table containing the data.
    table is a lua table containing the data.
 CImage,
CArray, and CMatrix
are class objects containing the data to measure,
    CImage,
CArray, and CMatrix
are class objects containing the data to measure,
 CRect is
a CRect rectangle
object that defines the region to measure.
    CRect is
a CRect rectangle
object that defines the region to measure.
 nHigh and nLow
specify the high and low percentiles to reject from the data
distrubution, in the range 0 through 100.
    nHigh and nLow
specify the high and low percentiles to reject from the data
distrubution, in the range 0 through 100.
 nStdDev is the clipped standard deviation of
the data. On failure, 0 is
returned.
    nStdDev is the clipped standard deviation of
the data. On failure, 0 is
returned.
Suppose a CImage I and a CRect R exist. The following script returns the clipped standard deviation values inside a rectangle on the image:
|  | -- create a CStats object | 
|  | -- specify the upper and lower points to clip | 
|  | -- calculate the statistic for I and R | 
|  | -- list the results | 
The following script returns the clipped standard deviation for a table of data. The 2 highest values and 1 lowest value are excluded from the calculation:
|  | -- create a CStats object | 
|  | -- create some data in a table | 
|  | -- list the result |