clear all
clc
% define my deck 100 ball each color
for i=1:100
deck_num(i,:) =( [1,2,3,4,5]'); % test
i=i+5;
end
%dvide to 80 basket for 500 balls
r=randi([1,80],1,500);
for i=1:500
x=(r(i)); % go to number of busket
deck_b(i,r(i))=deck_num(i);
end
% count how many are in the basket from each color
for i=1:80
s1=numel(find(deck_b(:,i)==1)); % count the red color
s2=numel(find(deck_b(:,i)==2)); % count the green color
s3=numel(find(deck_b(:,i)==3)); % count the purple color
s4=numel(find(deck_b(:,i)==4)); % count the yellow color
s5=numel(find(deck_b(:,i)==5)); % count the blue color
basket(:,i)=[s1 s2 s3 s4 s5]; % final result culom 1:80 are basket and row 1:5 (vector) define 5 different color
end