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