MATLAB: List Box in GUI

list box

How to get the index of elements from the list box of not selected items from list box.
Usually list box gives elements index of selected items using property values

Best Answer

Try this (untested):
% Get list of all of the filenames in the list,
% regardless of whether they are selected or not.
ListOfImageNames = get(handles.lstImageList, 'string');
numberOfItems = length(ListOfImageNames);
% Get the index(es) of the entry they've selected.
Selected = get(handles.lstImageList, 'value');
% Get the index(es) of the entry they've NOT selected.
notSelected = find(~ismember(1:numberOfItems, Selected))
Related Question