I found a way to do it (If anyone is having trouble with this issue in the future)
1) List-Box ItemsData as 1x2 numeric vector:
[1 2]
2) value-changed function callback:
% Value changed function: choosefromListBox
function choosefromListBoxValueChanged(app, event)
app.whatever = str2num(app.choosefromListBox.Value)
end
3) reference in other function:
app.whatever(1,1) %returns 1
______________________________