버전 (11.8 KB) 작성자: Felix Birkelbach
Parses a Modelica result file into a nested tree structure in Matlab

다운로드 수: 632

업데이트 날짜: 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 (2023). 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!
버전 게시됨 릴리스 정보

Resolved a bug with array parsing.