search for: sigma_pos_old

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

2006 Oct 03
1
do.call with Vectorial Argument
...kage). Consider the small script: remove(list=ls()) #library(adapt) # first a list of the parameters tau<-0.1 beta<-1/tau St<-tau D=2e-2 q<-2*beta^2*D lam1<- -beta/2*(1+sqrt(1-4*St)) lam2<- -beta/2*(1-sqrt(1-4*St)) x0<- 0 vx0<- 1 # fist a function with scalar parameters sigma_pos_old<-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*lam2) ) } # now the same function where the only argument t is given as a 1x1 vector sigma_pos<-function(myargs) { q/(lam1-lam2)^2*( (exp(2*lam1*myargs[1])-1)/...