function kocka3(n) a = sum(unidrnd(6, 3, n)); for x = 3 : 18; y(x - 2) = sum(a == x); end plot(3 : 18, y); end