Engee documentation

Zero Crossing

Counts the number of times the signal crosses zero in one time step.

zero crossing

Description

The Zero Crossing block concludes that the signal in this channel has crossed zero if it satisfies any of the following criteria, where is the current signal value, is the previous value, and so on:

  • и

  • и

  • For a positive integer L, , , and , where .

  • For a positive integer L, , , and , where .

For the first input signal value and are zero.

On the Cnt port the block outputs the number of signal crossings with zero for one time step.

Ports

Input

Port_1 - input signal
vector | matrix

Input signal specified as a real vector or matrix.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Output

Cnt - number of zero crossings
scalar | vector-string

The block outputs the number of zero crossings in the input data as one of these values:

  • scalar - if the input data is in the form of a column vector, the block outputs a scalar value representing the number of zero crossings in the input data.

  • vector-row - if the input data is a matrix, the block outputs a row vector, each element of which represents the number of zero crossings in the corresponding column of the input data.

Data types: Float64.