Shuffling can easily be achieved by using a random permutation of the rows generated with randperm. Sorting can easily be achieved by using sortrows. If you want to sort first by suit then by rank specify [2 1] for the column argument. The only difficulty is that you're using letters for the card values and suits and that the order of these letters does not reflect the actual card value. The answer is simple, use the card value directly and replace these with letters at the end only for display.
Two notes:
The brackets in [''] are completely unnecessary. c = '23456789TJQKA'; does the same with less character and less time (since the brackets cause matlab to call the horzcat function)
The construction of your deck works because 13 and 4 are coprime. The proper way to construct the cartesian product of two set is to use ndgrid:
[cards, suits] = ndgrid('23456789YJQKA', 'CDHS'); %but as said, to make sorting easier I'd use ndgrid(1:13, 1:4)
deck = [cards(:), suits(:)];
