Code covered by the BSD License  

Highlights from
choose_transect_limits

image thumbnail
from choose_transect_limits by Kevin Bartlett
GUI for choosing time limits of oceanographic transects

get_popup_value(popHndl)
function [popUpVal] = get_popup_value(popHndl)
%
% get_popup_value.m--Gets current value of a popup menu. 
%
% Syntax: popUpVal = get_popup_value(popHndl)
%
% e.g.,   h = uicontrol('style','pop','String',{'A' ' B ' 'C' 'D'})
%         popUpVal = get_popup_value(h)

% Developed in Matlab 7.6.0.324 (R2008a) on GLNX86.
% Kevin Bartlett (kpb@uvic.ca), 2008-06-19 13:55
%-------------------------------------------------------------------------

strs = get(popHndl,'String');
popIndex = get(popHndl,'Value');
popUpVal = strtrim(strs{popIndex});

Contact us at files@mathworks.com