Re: [R] Using integrate

2008-07-21 Thread Duncan Murdoch
On 21/07/2008 4:56 PM, Ayman Oweida wrote: I have a function, say: f<-function(x) exp(x) and I would like to obtain the integration of the function while adding a few operations within the integration (I need point-by-point integration), say: t<-seq(0,40, by=1) z<-array(0,length(t)) for (i in

[R] Using integrate

2008-07-21 Thread Ayman Oweida
I have a function, say: f<-function(x)  exp(x) and I would like to obtain the integration of the function while adding a few operations within the integration (I need point-by-point integration), say: t<-seq(0,40, by=1) z<-array(0,length(t)) for (i in 1:40){ z[i] <- integrate ( f *  (t [i+1] -