modelicaImport

版本 1.1.0.0 (11.8 KB) 作者: Felix Birkelbach
Parses a Modelica result file into a nested tree structure in Matlab
664.0 次下载
更新时间 2018/5/23

查看许可证

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.

引用格式

Felix Birkelbach (2024). modelicaImport (https://www.mathworks.com/matlabcentral/fileexchange/49015-modelicaimport), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2016b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 String Parsing 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

Resolved a bug with array parsing.

1.0.0.0