zcross

From STX Wiki
< Programmer Guide‎ | Command Reference‎ | EVAL
Revision as of 14:05, 17 May 2010 by 193.171.195.8 (talk) (initial import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
zcross
Usage:

zcross(x [, type=0 {0..3}, xmin=0, srate=1])

Parameters:
type
The type of result to return (see Result)
xmin
The minimum x value.
srate
The sampling rate.
Result:

Returns a scalar:

If type=0, the number of zero-crossings.

If type=1, the density of zero-crossings (number of zero-crossings / seconds).

If type=2, the frequency of zero-crossing (density / 2).

If type=3, the period length (1 / frequency = 2 / density).

Description:

Count the number of zero-crossings in the vector x. This is a subcommand of the EVAL command.

Navigation menu

Personal tools