MATLAB: To Build a DropDown menu

dropdown menuguiMATLABpopup menu

Hi all,
I want to make one dropdown menu(popup) in MATLAB GUI. The thing is like this dropdown menu should be build according to the user input. If i give a number in edit text, then the popup bar has to be created accordingly. for example if we give a no. 3, then the popmenu should be generated till 3. Please help me in finding the solution.
Thanks in Advance.

Best Answer

Run the .mlapp file from the attached zip file. Enter a number, like 5, in the edit field and Click Apply. See the results.