function res=Galton(nbsimul) loi=[0.5 0.2 0.1 0.2]'; nmax=100; for k=1:nbsimul z=1;nbgen=0; while z($)>0&z($)