% Generate non-repeating sequences of integers in [1..10] 10000 times.

% Vector frequency stores the counts of the sequence lengths such that

% frequency(f) is the number of arrays of length f that have been

% returned by function sequence.



m= 10;

frequency= zeros(1,10);



for k= 1:10000

    a= sequence(m);

    f= length(a); 

    frequency(f) = frequency(f)+1;

end



len= length(frequency);

bar(1:len, frequency);

