function X=Particules(p,a,n,X0)
    X=zeros(1,n)
   X(1)=X0;
   for i=2:n
       X(i)=X(i-1) + grand(1,'poi',a)-grand(1,'bin',X(i-1),p)
   end
    
endfunction