Pseudorandom character matrix generation
Afficher commentaires plus anciens
Generate a 10x10 matrix with the letters 'b', 'd', 'p', 'q' in randomized order. Every refresh should produce a new randomized matrix.
This is to simulate the bdpq test. Should be a pretty simple task, but seems to be otherwise!
Réponse acceptée
Plus de réponses (1)
s = {'b', 'd', 'p', 'q' } ;
S = cell(10) ;
for i = 1:10
for j = 1:10
t = s(randperm(4,4)) ;
S{i,j} = [t{:}] ;
end
end
S
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!