MATLAB: How to create a random distribution of 2 words in 30 places

MATLAB

I am confused to create the random distribution of the two words such as "mango" and "orange" into 30 places?

Best Answer

Words = ["mango", "orange"] ;
Output = Words(randi(length(Words), 1, 30);