CStats:SdevClipValue
The SdevClipValue method computes the clipped Standard Deviation about a value which is supplied, rather than calculated. 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:SdevClipValue( table, nHigh, nLow, nValue ) nStdDev = CStats:SdevClipValue( CImage, nHigh, nLow, nValue ) nStdDev = CStats:SdevClipValue( CImage, nHigh, nLow, nValue, CRect ) nStdDev = CStats:SdevClipValue( CArray, nHigh, nLow, nValue ) nStdDev = CStats:SdevClipValue( CArray, nHigh, nLow, nValue, CRect ) nStdDev = CStats:SdevClipValue( CMatrix, nHigh, nLow, nValue ) 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 object that
defines the region to measure.
    CRect is
a CRect 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.
 nValue is the value about which to calculate
the standard deviation.
    nValue is the value about which to calculate
the standard deviation.
 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 CRect R exist. The following script returns the standard deviation inside the rectangle, calculated relative to a specified value. The 3 highest and 5 lowest values are clipped from the data sample:
|  | -- create a CStats object | 
|  | -- return the standard deviation | 
|  | -- list the results | 
The following script returns the standard deviation of a table, relative to a specified mean value.relative to a specified mean value inside a rectangle on the image:
|  | -- create a CStats object | 
|  | -- create a table to measure | 
|  | -- number of high and low clip | 
|  | -- set a mean value | 
|  | -- return the standard deviation | 
|  | -- list the results |