if 1  % illustrate the behaviour of the running average
 N = 10^4; % number of throws
 n = [1:N];
 data = discrete_rnd([1 2 3 4 5 6],[1 1 1 1 1 1],1,N);
 RunningAverage = cumsum(data)./n;

 figure(1)
 semilogx(n,RunningAverage)
 xlabel('number of throws'); ylabel('average');
end%if

if 1 % illustrate the distribution of the results
 N = 10^4; % number of throws
 n = 10;    % number of dices
 data = sum(discrete_rnd([1 2 3 4 5 6],[1 1 1 1 1 1],n,N))/n;

 MeanValue = mean(data)
 StandardDev = std(data)

 figure(2)
 [heights,centers] = hist(data,[1.5:0.5:5.5]);
 bar(centers, heights/sum(heights))
 xlabel('average values');
end%if
