timeatlevel

Signal processing tool that indicates how long the signal spends at a given magnitude.

Syntax

timeatlevel(xvect, yvect, numcrossings, output, debug)

Arguments

xvect
The time vector of the data to be analyzed.
yvect
The Y vector of the data to be analyzed.
numcrossings
The number of crossings desired.
output (0/1/2)
Used to determine the vector return type.
  • 0 = Levels
  • 1 = The time at the level.
  • 2 = The percentage of time at level.
debug
The flag to turn on the debug mode. Prints debug information to the debug *.csv in current working directory. Optional argument (default = off).

Example

X = timeatlevel(p1w1c1.x,p1w1c1.y,5,0)
Y = timeatlevel(p1w1c1.x,p1w1c1.y,5,1)
Y = timeatlevel(p1w1c1.x,p1w1c1.y,5,2)

Comments

N/A