Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(fda)
- data("StatSciChinese")
- knots<-rep(1:601)
- mybasis<-create.bspline.basis(rangeval=c(0, 601), nbasis=60, norder=5,
- dropind=NULL, quadvals=NULL, values=NULL, basisvalues=NULL,
- names="writing bspline")
- myfd_x<-Data2fd(argvals=knots, y=StatSciChinese[,,1], basisobj=mybasis)
- plot(myfd_x, main="horizontal coordinate against time for twenty trials")
- D1_fd_x<-deriv.fd(myfd_x, 1)
- D1_evalfd_x<-eval.fd(knots, D1_fd_x)
- plot(D1_fd_x, main="horizontal velocity against time for twenty trials")
- D2_fd_x<-deriv.fd(myfd_x, 2); D2_evalfd_x<-eval.fd(knots, D2_fd_x)
- plot(D2_fd_x, main="horizontal acce against time for twenty trials")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement