Need some help, pulling my hair out trying to figure out how to program this in Mathcad. I'm reading data from a data file and plotting that on a graph. From the data I want to determine when the amplitude of the incoming data goes above a threshold for a certain duration. If both the amplitude above the threshold and duration are met, I then want to plot a pulse on another graph. Pulse would just be a "0" or a "1". See attached JPG file. Any help would be appreciated.