How do I store output of listEntry function in a variable

As I am new to matlab, I don't know the way to store the output of listEntry function in a variable.
I need to access that variable as an array so that I can iterate over one of its column.
Thanks in advance.

Antworten (2)

HaMo
HaMo am 11 Jun. 2018
This is a workaround I came up with:
dictObj = Simulink.data.dictionary.open('MyDictionary.sldd');
secObj = getSection(dictObj, 'MySection');
entries = secObj.find;
variableNames = {entries.Name};
Natalie E
Natalie E am 15 Apr. 2025

0 Stimmen

You can also use the following to literally 'steal' the output of listEntry (useful for optional arguments for sorting):
slddObj = Simulink.data.dictionary.open('MySldd.sldd');
output = evalc('listEntry(slddObj)');
You'll have to clean up the results a little bit to get rid of the headers but the data is there.

Kategorien

Mehr zu Software Development finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 11 Dez. 2017

Beantwortet:

am 15 Apr. 2025

Community Treasure Hunt

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

Start Hunting!

Translated by