List Box in GUI
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Titus Edelhofer
el 30 de Mzo. de 2012
Hi,
you could do the following if I understood the question correclty:
allStrings = get(handles.listbox1, 'string');
selected = get(handles.listbox1, 'value');
% all indices:
allIndices = 1:length(allStrings);
% now subtract:
unselected = setdiff(allIndices, selected);
Titus Titus
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!