This repository has been archived on 2021-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
scientificComputing/projects/project_vector_strength/solution/zeroCrossings.m

9 lines
193 B
Matlab

function xings = zeroCrossings(data, time, threshold)
if nargin == 2
threshold = 0;
end
shift_data = circshift(data, 1);
xings = time((data >= threshold) & (shift_data < threshold));