I'm not quite familiar with R. Could you recommend some relative material.
Actually, I'm not intend to loop from 1 to 1. I'm just trying to see if it
works. It's supposed to be some len>1.
I'm trying to solve the following example:
there are 3 types of variables(x,w,t), they are not independen
cuhre is a function in package R2Cuba for multidimensional integration.
There are three kind of variables to integrate. I just use y,w,t to
distinguish them from each other. Is there any problem ?
--
View this message in context:
http://r.789695.n4.nabble.com/cuhre-usage-multidimensional-integra
my=function(x){
len=1
for(i in 1:len){
y[i]=x[i]
}
g=1
w=NULL
t=NULL
for(i in 1:len)w[i]=x[i+len]
for(i in 1:len)t[i]=x[i+2*len]
for(i in 1:len)g=g*dnorm(y[i])*dnorm(w[i])*dnorm(z[i])
return(g)
}
cuhre(6,1,my,rep(-100,6),rep(100,6))
Error in crff(match.call(), integrand, "cuhre", libargs, ...) :
3 matches
Mail list logo