Based on the startle detection prorgram by Jennifer Healey (Dec 13, 1999)
(Optional)
A startle region is first roughly defined as a "large" region where the first sample point has the only "significant" positive first difference, and no other point in the region has such a "significant" positive first difference.
Given the startle regions, we define
beg
) to be the first sample point before a region
with a negative first difference, andend
) to be the maximum point between the beginning of
this region and the beginning of the next.
end-beg
, ands(end)-s(beg)
,
where s
is the signal.