|
Calling Sequence
|
|
Threshold(A, level)
|
|
Parameters
|
|
A
|
-
|
Array of (real or complex) numeric values; the signal
|
level
|
-
|
realcons or [realcons, realcons], threshold value(s)
|
|
|
|
|
Options
|
|
•
|
absolutevalue : truefalse, specifies whether or not to use absolute values when thresholding
|
•
|
container : Array, predefined Array for holding results
|
•
|
comparison : lessthan, greaterthan, or lessgreater; type of comparison
|
•
|
inplace : truefalse, specifies that output should overwrite input
|
•
|
value : realcons or [realcons, realcons], alternative values to replace level values
|
|
|
Description
|
|
•
|
The Threshold command performs thresholding operations on samples, which means retaining or discarding data points that do not meet some kind of minimality criterion.
|
•
|
If the comparison option is lessthan (the default), then "less-than" thresholding is done on the Array A and the result, an Array B having the same length and datatype, is returned. The threshold is determined by the value of the parameter level as follows for real data.
|
•
|
For a complex Array A, the value of the level parameter must be real and non-negative. In this case, the formula governing the thresholding function is given by
|
•
|
If the comparison option is greaterthan, then "greater-than" thresholding is done on the Array A. This is similar to the process described for comparison=lessthan, except that the less-than symbol is replaced by the greater-than symbol in the definitions shown above.
|
•
|
If the absolutevalue option is set to true then thresholding is done on absolute values. The formula in this case, with comparison=lessthan, is shown below. With comparison=greaterthan, the inequality is replaced by . Note that this option works with real data only. The default value is false.
|
•
|
The value option allows you to specify an alternative real value to place in the output Array instead of level, as shown in the formulae below, with comparison=lessthan:
|
•
|
The value option also works with comparison=greaterthan, and in this case, the inequalities in the formulae above are reversed. In addition, the comparison option can also take the lessgreater value, where both "less-than" and "greater-than" conditions are used. In this case, the level parameter and the value option should each be a list of two real values, and level[1] must be less than level[2].
|
•
|
By default, the value option is equal to level. Values in the Array A that are less than level[1] are set to value[1] in B, while those values in A that are greater than level[2] are set to value[2] in B. The precise formula used is
|
•
|
Before the code performing the computation runs, Maple converts A to a hardware datatype, first attempting float[8] and subsequently complex[8], unless it already has one of these datatypes. For this reason, it is most efficient if A has one of these datatypes beforehand.
|
•
|
If the container=C option is provided, then the results are put into C and C is returned. With this option, no additional memory is allocated to store the result. The container must be an Array having datatype and size equal to those of A.
|
•
|
If the inplace or inplace=true option is provided, then A is overwritten with the results. In this case, the container option is ignored. Furthermore, A must have one of the datatypes float[8] and complex[8].
|
|
|
Thread Safety
|
|
•
|
The SignalProcessing[Threshold] command is thread-safe as of Maple 17.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
|
|
Compatibility
|
|
•
|
The SignalProcessing[Threshold] command was introduced in Maple 17.
|
|
|
|