MATLAB: LISTBOX, PLEASE HELP ME WITH THE LISTBOX

guidelistboxMATLAB

Hello, i have posted some questions before about listbox but none give an answer….
my question is simple
i have this matrix:
a=1:1:10 % this is 1 2 3 4 5 6 7 8 9 10
i would like to load these numbers into a listbox, but i dont know how, must i change these numbers to char???
how ca i do this???? thanks in advance

Best Answer

  • The array has to be transformed into a cell arrary:
    a=1:1:10;
    b=num2cell(a);
    Then, send it to the popup menu:
    set(handles.my_pop,'String',b);