p = {[] [] [] []};
s = {'Clubs', 'Diamonds', 'Hearts', 'Spades'};

for c = 1:52
   card(c).suit = s{ceil(c/13)};
   card(c).value = mod(c, 13)+1;
end

x = 1:52;

for ii = 1:100
   c1 = randi([1, 52]);
   c2 = randi([1, 52]);
   t = x(c2);
   x(c1) = x(c1);
   x(c2) = t;
end

for c = 1:52
   p{mod(c, 4)+1} = [p{mod(c, 4)+1} card(x(c))];
end

for h = 1:4
   fprintf('\nCards in hand %d\n', h)
   for ii = 1:13
      fprintf('  %d of %s\n', p{h}(ii).value, p{h}(ii).suit)
   end
end

