function [tonic_time] = thresholdDeltoid(ratio)
    L = length(ratio);
    
    % Threshold = 20% of HF/LF ratio peak
    threshold = 0.2 * 70; % For the algorithm to run in real time, we have predefined this threshold
    tonic_time = 0;
    for m = 1:L
        if ratio(m) > threshold
            tonic_time = tonic_time + 1;
        end
    end
    tonic_time = tonic_time / 1024; % Time in seconds
end

