Hello Everyone,
I am a newbie at Matlab. I am trying to create a listbox and populate it with audio filenames that is select by the user with upload pushbutton. I did it successfully, however when I try to select a different file by clicking the upload push button, the file names concat. I want the filename in a different line (i.e, value 2 of listbox)
This is what I did!
global SoundNameArray;
[filename, filepath, cCheck] = uigetfile('*.mp3', … 'Select an audio file','MultiSelect','on');
SoundNameArray = [SoundNameArray filename];
h = msgbox(SoundNameArray);
% Check if the user selected one file or multiple
if(cCheck ~=0)
%Reset selection to first entry
set(handles.select_audio, 'Value', 1); %Show selected file names in the listbox
set(handles.select_audio,'String', SoundNameArray);elseend
I would be really grateful if anyone could help. Merry Christmas 🙂
Best Answer