clear a = 1; N = 20; p = 1/N; nDados = 1000; nREP = 20; figure plot( (0:5), poisspdf( (0:5), a ), '*--k' ) hold on for qR = 1 : nREP n = binornd( N, p, nDados, 1 ); nc = hist( n, 0:5 ); F = nc/nDados; plot( (0:5), F, '.r' ) end