sync.fd: Synchronized 3D motion in "fd" object format

Description Format See Also Examples

Description

3D motion for two individuals moving synchronously, given as a functional data object.

Format

An object of class "fd", created by applying function make.fd to data set syncsham.

See Also

[syncsham]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Reproduce x-, y- and z-coordinate plots (Fig. 5 of Reiss, Gvirts et al.)
data(sync.fd)
require(fda)
rnge <- c(61,62.2)  
par(mfrow = c(3,1))
par(mar=c(4, 4, 0, 2))
times <- seq(sync.fd$bsb$rangeval[1], sync.fd$bsb$rangeval[2], , 1000)
x0 <- eval.basis(times, sync.fd$bsb) %*% sync.fd$x0$coefs
x1 <- eval.basis(times, sync.fd$bsb) %*% sync.fd$x1$coefs
matplot(times, cbind(x0,x1), type='l', lty=c(3,1), col=1, xlab="", ylab="x-coordinate")
abline(v=rnge[1], col="red")
abline(v=rnge[2], col="red")
y0 <- eval.basis(times, sync.fd$bsb) %*% sync.fd$y0$coefs
y1 <- eval.basis(times, sync.fd$bsb) %*% sync.fd$y1$coefs
matplot(times, cbind(y0,y1), type='l', lty=c(3,1), col=1, xlab="", ylab="y-coordinate")
abline(v=rnge[1], col="red")
abline(v=rnge[2], col="red")
z0 <- eval.basis(times, sync.fd$bsb) %*% sync.fd$z0$coefs
z1 <- eval.basis(times, sync.fd$bsb) %*% sync.fd$z1$coefs
matplot(times, cbind(z0,z1), type='l', lty=c(3,1), col=1, xlab="Time", ylab="z-coordinate")
abline(v=rnge[1], col="red")
abline(v=rnge[2], col="red")

reissphil/cvv documentation built on May 21, 2019, 10:08 a.m.