MATLAB: Get string from popupmenu

popupmenu

I want to get string from popupmenu and use it as string in another function

Best Answer

Try this:
allItems = handles.popupname.String; % A cell array of all strings in the popup.
selectedIndex = handles.popupname.Value; % An integer saying which item has been selected.
selectedItem = allItems{selectedIndex}; % The one, single string which was selected.
YourOtherFunction(selectedItem); % Pass the string to some other function of yours.