search for: sig_xx

Displaying 2 results from an estimated 2 matches for "sig_xx".

2006 Sep 22
4
Creating Movies with R
...along x lam1<- -beta/2*(1+sqrt(1+4*St)) lam2<- -beta/2*(1-sqrt(1+4*St)) xmin<- -0.5 xmax<-0.5 x0<-0.1 vx0<-x0 nx<-101 ## grid intervals along x newx<-seq(xmin,xmax,len=nx) # grid along x # M1 <- do.call("g", c(list(x = newx), mypar)) mypar<-c(q,lam1,lam2) sig_xx<-do.call("sigma_pos",c(list(t=newtime),mypar)) mypar<-c(lam1,lam2,x0,vx0) exp_x<-do.call("expect_position",c(list(t=newtime),mypar)) #rho_x<-function(x,expect_position,sigma_pos) #NB: at t=0, the density blows up, since I have a delta as the initial state! # At any...
2006 Oct 03
1
do.call with Vectorial Argument
...nly argument t is given as a 1x1 vector sigma_pos<-function(myargs) { q/(lam1-lam2)^2*( (exp(2*lam1*myargs[1])-1)/(2*lam1)-2/(lam1+lam2)*(exp(lam1*myargs[1]+lam2*myargs[1])-1) + (exp(2*lam2*myargs[1])-1)/(2*lam2) ) } # Now I use do.call newtime<-seq(1,5,len=1001) mypar<-c(q,lam1,lam2) sig_xx<-do.call("sigma_pos_old",c(list(t=newtime),mypar)) # Now this line does not work; sig_xx2 is not a vector equal to sig_xx sig_xx2<-do.call("sigma_pos",c(list(myargs =newtime))) So I am making some mistake with the do.call command, since I get a single value rather th...