//
// Simulation d'un processus de Poisson
//
xset("window",0); xbasc();
xset("default");
xset("font",2,3);
//
n=30;
temps = grand(1,n,"exp",0.5);      // exponentielle parametre 2
dates=cumsum(temps);
dates = dates(find(dates<10));
nev = size(dates,"*");
dates=dates.*.[1,1];
dates =[0,dates,10];
valeurs=[0:nev].*.[1,1];
plotframe([0,0,10,20],[0,10,5,4],[%f,%f],["Processus de Poisson","",""]);
plot2d(dates',valeurs',1,"000");



 
 





