Programmer Guide/SPU Reference/STAT: Difference between revisions

From STX Wiki
Jump to navigationJump to search
(initial import)
 
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
====STAT - mean and std.deviation====
Mean and standard deviation of input <var>A</var>.
 
==<code>[SPU STAT <var>A</var> OUT <var>MY SIGMA</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><BR><math>SIGMA=\sqrt{\frac{1}{n-1}\sum_{i=0}^{n-1}(A[i]-MY)^2}</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]]

Latest revision as of 10:20, 6 May 2011

Mean and standard deviation of input A.

[SPU STAT A OUT MY SIGMA]

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

with: n = length of Avector

See also

<SP-atoms>

Navigation menu

Personal tools