Skip to contents

Compute velocity via Engbert & Kliegl (2003) algorithm. See formula #1 in the manuscript.

Usage

compute_velocity_ek(x, trial, time_window_in_samples, delta_t)

Arguments

x

Vector of coordinates

trial

Vector with trial labels, so that velocity is computed only within trials.

time_window_in_samples

Width of window for velocity computation in samples.

delta_t

Duration of a single frame (1 / sampling rate).

Value

Velocity vector