MATLAB: Specify popup menu location on screen

popupspecify locationuicontrol

OK, I know this is an easy one, but I can't seem to get the syntax right. I have a line of code in which a popup menu appears to ask for an input:
mnu = menu('Add an element not listed?', 'No', 'Yes');
As is, I can never predict where the popup menu will appear on the screen. How can I specify the menu location so that it always appears near the center of my screen?

Best Answer

  • How about another way to accomplish the same thing, with some sort of uicontrol?