modelicaImport

Parses a Modelica result file into a nested tree structure in Matlab
667 téléchargements
Mise à jour 23 mai 2018

Afficher la licence

This function parses a Modelica result file (*.mat) into a tree structue so that all variables can be accessed the same way as in Modelica.
The path to the result file has to be provided. The user can also pass a regular expression to the function to limit the return variables.
The output is a nested structure where all variables can be accessed via dot-notation. Arrays of objects in Modelica are parsed into arrays in Matlab.
res = modelicaImport(path, regex);
eg. res.object.subObject.variable
eg. res.object.subobject(1).variable
This function is pretty much a byproduct of a simulation project I did for university - I hope that is is useful. I have used this function with OpenModelica 1.9.1+dev (r22052) and Dymola 2015.

Citation pour cette source

Felix Birkelbach (2024). modelicaImport (https://www.mathworks.com/matlabcentral/fileexchange/49015-modelicaimport), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2016b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur String Parsing dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.1.0.0

Resolved a bug with array parsing.

1.0.0.0