>  Docs Center  >  Libraries  >  Daithi  >  ZERO_CROSS

ZERO_CROSS

ZERO_CROSS

Name


ZERO_CROSS

Purpose


This function returns the number of zero crossings in a given time
series.

Category


Time Series Analysis

Calling Sequence


Result = ZERO_CROSS( Data )

Inputs


Data: A vector of type integer or floating point.

Keyword Parameters


SUBTRACT_MEAN: If set, the global mean is substracted from the time
series before analysis. The default is not to do so.

Optional Outputs


POS: Returns the locations in Data just before the zero crossings.

Outputs


Result: Returns the number of zero crossings.

Uses


MEAN.pro

Procedure


This function iteratively compares the signs of neighbouring points.

Example


Define a vector.
data = [-1,2,3,-1,2]
Find the number of zero crossings.
result = zero_cross( data )
The result should be 2.

Modification History


  Written by: Daithi A. Stone (stoned@atm.ox.ac.uk), 2003-10-09.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us