Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. library(fda)
  2. data("StatSciChinese")
  3. knots<-rep(1:601)
  4. mybasis<-create.bspline.basis(rangeval=c(0, 601), nbasis=60, norder=5,
  5. dropind=NULL, quadvals=NULL, values=NULL, basisvalues=NULL,
  6. names="writing bspline")
  7. myfd_x<-Data2fd(argvals=knots, y=StatSciChinese[,,1], basisobj=mybasis)
  8. plot(myfd_x, main="horizontal coordinate against time for twenty trials")
  9. D1_fd_x<-deriv.fd(myfd_x, 1)
  10. D1_evalfd_x<-eval.fd(knots, D1_fd_x)
  11. plot(D1_fd_x, main="horizontal velocity against time for twenty trials")
  12. D2_fd_x<-deriv.fd(myfd_x, 2); D2_evalfd_x<-eval.fd(knots, D2_fd_x)
  13. plot(D2_fd_x, main="horizontal acce against time for twenty trials")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement