Get Mouse Dependent Variables

Description

Interpolate a one-dimensional (angle), or two-dimension (x-y) trajectories to a user specified number of time bins.

Usage

1
interpltraj(x, y, singlepoint, tsmax)

Arguments

x

x-coordinate point of the trajectory

y

y-coordinate point of the trajectory

singlepoint

a logical flag to indicate whether interpolation is done on a single coordinate point (TRUE) or two points (FALSE)

tsmax

the new length of the interpolated trajectory

Value

It returns the interpolated trajectory, either one-dimensional (singlepoint == TRUE), or two-dimensional (singlepoint == FALSE)

Author(s)

Moreno I. Coco (moreno.cocoi@gmail.com)

References

Spivey, M., Grosjean, M. and Knoblich, G. (2005). Continuous attraction toward phonological competitors. Proceedings of the National Academy of Sciences of the United States of America, 102(29), 10393-10398.

Examples

1
2
3
4
5
6
data(mousemove)
x = mousemove$x; y = mousemove$y;
singlepoint = FALSE; tsmax = 101
ans = interpltraj(x, y, singlepoint, tsmax)

str(ans)