MATLAB: Items + Items Data issue

app designeritemsitemsdataMATLAB

I have defined:
app.select_solver_calc_properties.Items = {'Fminsearch', 'Fmincon', 'Look-up Table', 'Genetic Algorithm'};
app.select_solver_calc_properties.ItemsData = {'[1 2 3 4]'};
When I run
app.select_solver_calc_properties.Value = 3;
I get the error:
'Value' must be an element defined in the 'ItemsData' property.
I've consulted the dropdown page with no success. What am I doing wrong?
EDIT: The issue is that the inspector defaults to a non-numeric type for ItemsData. I'm not sure how to fix this since I can't edit the component setup part in App Designer.

Best Answer

You are using char array to set the UserData property. You should just pass it a numeric array
app.select_solver_calc_properties.ItemsData = [1 2 3 4];