How to read data dictionary and esport to mat file

5 visualizaciones (últimos 30 días)
Arunkumar M
Arunkumar M el 20 de Abr. de 2015
Respondida: Sebastian Castro el 21 de Abr. de 2015
Hello everyone, I have MATLAB2014a and I am working with data dictionary. I have read online and found following code to read and export data in data dictionary to mat file.
myDictionaryObj = Simulink.data.dictionary.open('Globaldata.sldd');
dDataSectObj = getSection(myDictionaryObj,'Design Data');
exportToFile(dDataSectObj,'myDictionaryDesignData.mat')
When I execute the first command
myDictionaryObj = Simulink.data.dictionary.open('myDictionary_ex_API.sldd');
I get the error that Simulink function or class unknown error.
I have the data dictionary file in my working directory. Can someone help resolving the issue?

Respuestas (1)

Sebastian Castro
Sebastian Castro el 21 de Abr. de 2015
The Simulink Data Dictionary API was officially released after R2014a, and the code sample you have is from the R2015a release.
The code for 14a will look like:
myDictionary = Simulink.dd.open('GlobalData.sldd');
This API is undocumented, but this has been covered in other blogs: http://undocumentedmatlab.com/blog/simulink-data-dictionary
- Sebastian

Categorías

Más información sobre Manage Design Data en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by