https://www.mathworks.com/matlabcentral/answers/376091-index-of-the-items-in-a-listbox
listitems = {'data1', 'data2', 'vector1', 'vector2', 'vector3', 'emc'}; hfig = uifigure; hbox = uilistbox(hfig, 'Items', listitems, 'Multiselect', 'on'); hbox.Value = {'data1', 'vector1', 'vector2', 'emc'}; %simulate user selection %get index of selected values [~, index] = ismember(hbox.Value, hbox.Items)
Add Comment