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

2 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)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by