Retreiving property value of each object in array

I have an array of user-defined objects with a property "name". I want to display all the names in a listbox. I am trying to extract them using
listOfNames=[handles.library.name]
%"library" is the object array%
but this returns one string of all the names concatenated. How can I extract the strings separately?

 採用された回答

James Tursa
James Tursa 2017 年 4 月 4 日

1 投票

Maybe use a cell array instead?
listOfNames = {handles.library.name};

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInteractive Control and Callbacks についてさらに検索

質問済み:

2017 年 4 月 4 日

回答済み:

2017 年 4 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by