Programmer Guide/SPU Reference/MASKABC: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
If the condition defined by <var>COND</var> is true, <var>C</var><sub>i</sub> is assigned to <var>Y</var><sub>i</sub>, otherwise <var>Y</var><sub>i</sub> is set to <var>A</var><sub>i</sub>. If <var>A</var> is a vector, the inputs <var>B</var> and <var>C</var> can be numbers or vectors with the same length as <var>A</var>. | If the condition defined by <var>COND</var> is true, <var>C</var><sub>i</sub> is assigned to <var>Y</var><sub>i</sub>, otherwise <var>Y</var><sub>i</sub> is set to <var>A</var><sub>i</sub>. If <var>A</var> is a vector, the inputs <var>B</var> and <var>C</var> can be numbers or vectors with the same length as <var>A</var>. | ||
:{|class="einrahmen" | :{|class="einrahmen" | ||
!COND !!Assignment | !<var>COND</var> !!Assignment | ||
|- | |- | ||
|<code>0</code> or <code><</code> | |<code>0</code> or <code><</code> |
Revision as of 14:01, 6 May 2011
Data masking / thresholding.
[SPU MASKABC A B SEL OUT Y]
input | description | data type | value type | default value |
---|---|---|---|---|
A | input data | number, vector | variable | |
B | masker or threshold | number, vector | variable | |
C | replacement data | number, vector | variable | |
COND | condition | number (int.), string | variable | 0
|
output | description | data type | value type | comment |
Y | masked data | same type as A | variable |
- Description
If the condition defined by COND is true, Ci is assigned to Yi, otherwise Yi is set to Ai. If A is a vector, the inputs B and C can be numbers or vectors with the same length as A.
COND Assignment 0
or<
1
or>
2
or≤
3
or≥
- with: 0 ≤ i < length of A; [i] means: index is used only if the input is a vector
- See also
<SP-atoms>