Simple and easy to read. I modified it to search for the falling edge from the end of the array instead of from the peak because my pulses have high overshoot at the rising/falling edges.
27 Feb 2011
fwhm
To calculate the full-width at half-maximum of an input.
Author: Patrick Egan