Programmer Guide/SPU Reference/AVR: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 17: Line 17:


;Description:
;Description:
The averaging algorithm is defined by the inputs <var>TYP</var> and <var>T</var>. The atom averages the elements <var>X</var>[i,j] over evaluation cycles t (i=row index, j=column index, t=cycle counter) and stores the averaged value in the element <var>Y</var>[i,j]=f(X</var>[i,j],t,<var>TYP</var>,<var>T</var>).
The averaging algorithm is defined by the inputs <var>TYP</var> and <var>T</var>. The atom averages the elements <var>X</var>[i,j] over evaluation cycles t (i=row index, j=column index, t=cycle counter) and stores the averaged value in the element <var>Y</var>[i,j]=f(</var>X</var>[i,j],t,<var>TYP</var>,<var>T</var>).
 
|<var>A<sub>number</sub></var>
|<var>A<sub>number</sub></var>
|<var>Y<sub>number</sub></var>
|<var>Y<sub>number</sub></var>

Revision as of 10:49, 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
Description

The averaging algorithm is defined by the inputs TYP and T. The atom averages the elements X[i,j] over evaluation cycles t (i=row index, j=column index, t=cycle counter) and stores the averaged value in the element Y[i,j]=f(X[i,j],t,TYP,T).

|Anumber |Ynumber |{\displaystyle Y=A} |- |Avector |Ynumber |{\displaystyle Y=\sum _{i=0}^{n-1}A[i]} |} with: n = length of Avector

See also

<SP-atoms>

Navigation menu

Personal tools