Programmer Guide/SPU Reference/STAT: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
====STAT - mean and std.deviation====
Mean and standard deviation of input <var>A</var>.
 
==<code>[SPU SUM <var>A</var> OUT <var>Y</var>]</code>==
=====Usage:=====
{|class="einrahmen"
 
!In !!Out
<code>STAT <var>a</var></code>
 
=====Inputs:=====
 
{|
|-
|-
|a
|<var>A<sub>number</sub></var>
|number or vector
|<math>MY=A</math><BR><math>SIGMA=0</math>
|}
 
=====Outputs:=====
 
{|
|-
|<var>my</var>
|average of a (number)
|-
|-
|sigma
|<var>A<sub>vector</sub></var>
|standard deviation of a (number)
|<math>MY=\frac{1}{n}\sum_{i=0}^{n-1}A[i]</math>
|}
|}
 
with: n = length of <var>A<sub>vector</sub></var>
=====Function:=====
;See also:
 
<[[../#Signal Processing Atoms|SP-atoms]]>
Compute average and standard deviation of input <var>a</var>.
<!-- AN, 2.5.2011 -->
 
If <var>a</var> is a number:
 
[[File:1281.png]]
 
If <var>a</var> is a vector with n elements:
 
[[File:1282.png]]

Revision as of 09:15, 6 May 2011

Mean and standard deviation of input A.

[SPU SUM A OUT Y]

In Out
Anumber {\displaystyle MY=A}
{\displaystyle SIGMA=0}
Avector {\displaystyle MY={\frac {1}{n}}\sum _{i=0}^{n-1}A[i]}

with: n = length of Avector

See also

<SP-atoms>

Navigation menu

Personal tools