How to play random song from list box in GUI Matlab?

2 visualizaciones (últimos 30 días)
Epri Pratiwi
Epri Pratiwi el 4 de Ag. de 2020
Comentada: Epri Pratiwi el 4 de Ag. de 2020
How to play randomly the selected song from list song box?

Respuesta aceptada

Walter Roberson
Walter Roberson el 4 de Ag. de 2020
songnames = handles.AppropriateListboxName.String;
N = length(songnames);
randomsong = songnames{randi(N)};
and then proceed to play the song.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by