MATLAB: Set list box

listbox

Hi,
I have number 5. How can I set up items of the listbox or popupmenu like this:
1
2
3
4
5
? Thanks

Best Answer

n = 5;
uicontrol('style','list','string',num2cell((1:n).'))
Related Question