search for: expect_position

Displaying 1 result from an estimated 1 matches for "expect_position".

2006 Sep 22
4
Creating Movies with R
...wo different times selected by the user. I wonder if it is possible to use the data generated for different times to create something like an .avi file. Here is the script: rm(list=ls()) library(lattice) # I start defining the analytical functions needed to get the density as a function of time expect_position <- function(t,lam1,lam2,pos_ini,vel_ini) {1/(lam1-lam2)*(lam1*exp(lam2*t)-lam2*exp(lam1*t))*pos_ini+ 1/(lam1-lam2)*(exp(lam1*t)-exp(lam2*t))*vel_ini } sigma_pos<-function(t,q,lam1,lam2) { q/(lam1-lam2)^2*( (exp(2*lam1*t)-1)/(2*lam1)-2/(lam1+lam2)*(exp(lam1*t+lam2*t)-1) + (exp(2*lam2*t)-1)/(2...