Hi all,
myint=function(mu,sigma){
integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value
}
x=seq(0,50,length=3000)
x=x[-1]
plot(x,myint(4,x)) # not working yet
I think I have to 'Vectorize' it somehow?
What's a scalar function? and a primitive function?
Thanks.
casper
? Vectorize
is the one you need here.
primitives are probably more subtle than you need and there's no such
thing as a scalar function by that name.
Michael
On Fri, Mar 23, 2012 at 5:12 PM, casperyc caspe...@hotmail.co.uk wrote:
Hi all,
myint=function(mu,sigma){
2 matches
Mail list logo