Programmer Guide/SPU Reference/AVR: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
|||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
==== | Average input <var>X</var> over evaluation cycles. | ||
==<code>[SPU SUM <var>X TYP T RS</var> OUT <var>Y</var>]</code>== | |||
{|class="einrahmen" | |||
|In:||<var>X</var>||a number, vector or matrix containing the data to be averaged | |||
| ||<var>TYP</var>||a number or string; defines the averaging method | |||
| ||<var>T</var>||averaging parameter (number); depends on method | |||
| ||<var>RS</var>||reset flag (number) | |||
|Out:||<var>Y</var>||averaged input <var>X</var>; same type as <var>X</var> | |||
|} | |||
|<var>A<sub>number</sub></var> | |||
|<var>Y<sub>number</sub></var> | |||
|<math>Y=A</math> | |||
|- | |- | ||
| | |<var>A<sub>vector</sub></var> | ||
| | |<var>Y<sub>number</sub></var> | ||
|- | |<math>Y=\sum_{i=0}^{n-1}A[i]</math> | ||
|} | |} | ||
with: n = length of <var>A<sub>vector</sub></var> | |||
;See also: | |||
<[[../#Signal Processing Atoms|SP-atoms]]> | |||
<!-- AN, 2.5.2011 --> |
Revision as of 09:42, 6 May 2011
Average input X over evaluation cycles.
[SPU SUM X TYP T RS OUT Y]
In: | X | a number, vector or matrix containing the data to be averaged | TYP | a number or string; defines the averaging method | T | averaging parameter (number); depends on method | RS | reset flag (number) | Out: | Y | averaged input X; same type as X |
|Anumber |Ynumber | |- |Avector |Ynumber | |} with: n = length of Avector
- See also
<SP-atoms>