how do you ask matlab for a random word from dictionary?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
randWord=randi(length(dictionary));
i tried using the code above and it gives me number instead of a word from the dictionary
Respuesta aceptada
KSSV
el 2 de Mayo de 2019
idx=randperm(length(dictionary),1);
randword = dictionary{idx}
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!