Programmer Guide/SPU Reference/DOT: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
====DOT - dot product====
Dot product of <var>A</var> and <var>B</var>.
 
==<code>[SPU DOT <var>A B</var> OUT <var>Y</var>]</code>==
=====Usage:=====
{|class="einrahmen"
 
!In !!Out !!Description
<code>DOT <var>A</var> <var>B</var></code>
 
=====Inputs:=====
 
{|
|-
|-
|A
|<var>A<sub>number</sub></var>, <var>B<sub>number</sub></var>
|number or vector
|<var>Y<sub>number</sub></var>
|<math>Y=A.B</math>
|-
|-
|B
|<var>A<sub>vector</sub></var>, <var>B<sub>vector</sub></var>  
|same type as A
|<var>Y<sub>number</sub></var>
|}
|<math>Y=\sum_{i=0}^{n-1}A[i].B[i]</math>
 
=====Outputs:=====
 
{|
|-
|Y
|dot product A.<var>B</var> (number)
|}
 
=====Function:=====
 
Compute the dot product of <var>A</var> and <var>B</var>.
 
{|
|-
|if A and <var>B</var> are numbers:
|Y = <var>A</var>.<var>B</var>
|-
|if A and <var>B</var> are vectors:
|Y = <var>A</var>[0].<var>B</var>[0] + ... + <var>A</var>[n-1].<var>B</var>[n-1];
|-
|
|n = number of elements of A|<var>B</var>
|}
|}
with: n = length of <var>A<sub>vector</sub></var>
;See also:
<[[../#Signal Processing Atoms|SP-atoms]]>
<!-- AN, 2.5.2011 -->

Latest revision as of 08:29, 6 May 2011

Dot product of A and B.

[SPU DOT A B OUT Y]

In Out Description
Anumber, Bnumber Ynumber {\displaystyle Y=A.B}
Avector, Bvector Ynumber {\displaystyle Y=\sum _{i=0}^{n-1}A[i].B[i]}

with: n = length of Avector

See also

<SP-atoms>

Navigation menu

Personal tools