Programmer Guide/SPU Reference/MIX: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
====MIX====
Mix inputs (weighted addition).
 
==<code>[SPU MIX <var>A KA B KB</var> OUT <var>Y</var>]</code>==
=====Usage:=====
{|class="einrahmen"
 
!In !!Out !!Description
<code>MIX <var>A KA B KB</var></code>
 
=====Inputs:=====
 
{|
|-
|-
|A
|<var>A<sub>number</sub></var>, <var>B<sub>number</sub></var>
|input number or vector
|<var>Y<sub>number</sub></var>
|<math>Y=A.KA+B.KB</math>
|-
|-
|KA
|<var>A<sub>vector</sub></var>, <var>B<sub>vector</sub></var>
|weighting factor for A (number)
|<var>Y<sub>vector</sub></var>
|-
|<math>Y[i]=A[i].KA+B[i].KB</math>
|B
|same type as A
|-
|KB
|weighting factor for B (number)
|}
|}
with: 0 &le; i &lt; length of <var>A<sub>vector</sub></var>


=====Outputs:=====
The inputs <var>KA</var> and <var>KB</var> (mix/weighting factors) must be numbers.
 
;See also:
{|
<[[../#Signal Processing Atoms|SP-atoms]]>
|-
<!-- AN, 2.5.2011 -->
|Y
|number or vector (same type as A)
|}
 
=====Function:=====
 
Compute the weight sum of inputs <var>A</var> and <var>B</var>.
 
if <var>A</var> and <var>B</var> are numbers: <var>Y</var> = <var>A</var>.<var>KA</var> + <var>B</var>.<var>KB</var>
 
if <var>A</var> and <var>B</var> are vectors: <var>Y</var>[i] = <var>A</var>[i].<var>KA</var> + <var>B</var>[i].<var>KB</var>

Latest revision as of 09:34, 6 May 2011

Mix inputs (weighted addition).

[SPU MIX A KA B KB OUT Y]

In Out Description
Anumber, Bnumber Ynumber {\displaystyle Y=A.KA+B.KB}
Avector, Bvector Yvector {\displaystyle Y[i]=A[i].KA+B[i].KB}

with: 0 ≤ i < length of Avector

The inputs KA and KB (mix/weighting factors) must be numbers.

See also

<SP-atoms>

Navigation menu

Personal tools