Programmer Guide/Command Reference/EVAL/zcross: Difference between revisions
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
;Usage: | ;Usage: | ||
:<code>qinterp(<var>x</var> {<var>type</var>, {, <var> | :<code>qinterp(<var>x</var> {<var>type</var> {, <var>sr</var> {, <var>xth</var>}}})</code> | ||
:;<var>x</var>:data vector (signal) | :;<var>x</var>:data vector (signal) | ||
:;<var>type</var>:selects the type of result; 0 <= ''type'' <= 3 (default=0) | :;<var>type</var>:selects the type of result; 0 <= ''type'' <= 3 (default=0) | ||
:;<var>sr</var>: sampling rate in Hz (default=1) | :;<var>sr</var>: sampling rate in Hz (default=1) | ||
:;<var>xth</var>: threshold value (default=0); if ''xth'' is a value greater than 0, fluctuations of the function in the range ''-xth'' < ''x''[i] < ''xth'' are ignored | |||
;Result: The function counts the number of zero crossings ''z'' of the function <code>''x''[i] = f(i)</code>. The returned result is a scalar depending on ''z'' and the argument ''type''. | ;Result: The function counts the number of zero crossings ''z'' of the function <code>''x''[i] = f(i)</code>. The returned result is a scalar depending on ''z'' and the argument ''type''. | ||
:{|class="einrahmen" | :{|class="einrahmen" |
Revision as of 11:06, 11 April 2011
Compute zero crossing density.
- Usage
qinterp(x {type {, sr {, xth}}})
- x
- data vector (signal)
- type
- selects the type of result; 0 <= type <= 3 (default=0)
- sr
- sampling rate in Hz (default=1)
- xth
- threshold value (default=0); if xth is a value greater than 0, fluctuations of the function in the range -xth < x[i] < xth are ignored
- Result
- The function counts the number of zero crossings z of the function
x[i] = f(i)
. The returned result is a scalar depending on z and the argument type.
type description result 0 the number of zero crossing z 1 the zero crossing density
(number of zero crossings / second)d = z / (ncol(x) * sr) 2 the average zero crossing frequenzy (in Hz) f = d / 2 3 the average zero crossing periode length (in seconds) t = 1 / f = 2 / d
- See also
- f0ac