interpolateTimes {qsplines}R Documentation

Interpolate a vector of times

Description

Linearly interpolate an increasing vector of times. This is useful to deal with the quaternions splines.

Usage

interpolateTimes(times, n, last = TRUE)

Arguments

times

increasing vector of times

n

integer, controls the number of interpolations: there will be n-1 time values between two consecutive original times

last

Boolean, whether to include or exclude the last element

Value

A vector, a refinement of the times vector.

Examples

library(qsplines)
interpolateTimes(1:4, n = 3)
interpolateTimes(c(1, 2, 4), n = 3)

[Package qsplines version 1.0.1 Index]