Puzzler: Count unique nonzero periods in a timeseries without a for loop
1 view (last 30 days)
given: a signal as a time series
return: discrete number of times is is holds a nonzero position
is there a way to do this task in a vector manner as opposed to a for loop that counts nonzero periods as it encounters them and flicks a counter.