Max - use randperm to generate a random index into your character array. Try the following
alphabet = 'abcdefghijklmnopqrstuvwxyz';
randIdx = randperm(length(alphabet),1);
randChar = alphabet(randIdx);
alphabet(randIdx) = [];
For example, if
then
and
alphabet =
abcdefghijklmopqrstuvwxyz
with the 'n' removed.
Best Answer