cross()

Computes the zero crossings of a signal, interval between successive zero crossings or slope at the crossing

Syntax
yCross = cross(signal, direction, slope)

Arguments
Name Description Range Type Default Required
signal the signal for which the zero crossing is to be found (-∞, ∞) real yes
direction type of zero crossing † [-1, 1] integer yes
slope specifies if slope is to be calculated, rather than interval between zero crossing [0, 1] integer 0 (no slope) no
† If direction = +1, compute positive going zero crossings. If direction = -1, compute negative going zero crossings. If direction = 0, compute all zero crossings

Examples

period = cross(vosc-2.0, 1)
this computes the period of each cycle of the vosc signal. The period is measured from each positive-going transition through 2.0V
period = cross(vosc-2.0, 1, 1)
returns the zero crossings and the slope at the zero crossings.

Defined In

Built in

Notes/Equations

The independent axis returns the time when the crossing occurred. If the third argument is set to 1, the dependent axis returns the slope at zero crossing. Otherwise the dependent axis returns the time interval since the last crossing (default behavior).

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources