No BSD License  

Highlights from
GetCurrentValue

from GetCurrentValue by Richard Medlock
Returns the current selection in a list box.

GetCurrentValue(listbox);
function [Selection,SelectionIndex] = GetCurrentValue(listbox);

% [Selection,SelectionIndex] = GetCurrentValue(listbox_handle)
%
% Returns a string containing the current selection in the specified listbox.
% Also return the index to the item in a second output argument.
%
%

ListItems = get(listbox,'string');
SelectionIndex = get(listbox,'value');
Selection = ListItems{SelectionIndex};

Contact us at files@mathworks.com