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

3 Ansichten (letzte 30 Tage)
Epri Pratiwi
Epri Pratiwi am 4 Aug. 2020
Kommentiert: Epri Pratiwi am 4 Aug. 2020
How to play randomly the selected song from list song box?

Akzeptierte Antwort

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

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by