I need to get random variables from poisson distributions with different 
lambda

this is the only way I got it to work at the moment BUT its very slow!

using Distributions
lambda=linspace(0.1,2,100)
out=zeros(Int64,100)
for i=1:length(lambda)
  P=Poisson(lambda[i])
  out[i]=rand(P)
end

Anyone have suggestions for speed improvements?

Thanks

Reply via email to