In the popupmenu how to show the serial number of the choice?

1 次查看(过去 30 天)
I have a list (string cell array) where I store the description of an object. When I present it in the popupmenu it would be nice to have the serial number of the choice as well. I do not want to incorporate serials into the list because it is possible to change the order of the objects, so before I put the list on the popupmenu I would like to put the actual serial numbers there.
Please help, how to do this, to add simply a number to a string cell array. Some elements of the array might also be empty, therefore in AA=string(list) command I get "Error using string Conversion from cell failed. Element 19 must be convertible to a string scalar."
Here element 19 is empty.
Thanks.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by