Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

OM binary (mat) output file format

OM binary (mat) output file format

I already have created a plotting program that is able to read many input formats.
I'm now considering to make it capable to read also OM mat output files (and consequently also Dymola output files).
Can anyone tell me where I can find a description of this Format?
I'm quite at ease with Matlab 4 format. But this is not enough to be able to list variables and read contents of OM matlab output flles.

Thanks a lot in advance.

Re: OM binary (mat) output file format

First hits in google: https://openmodelica.org/index.php/forum/topic?id=434
The dataInfo matrix corresponds to names and descriptions. It contains the data_n matrix, column number, interpolation and something else (Dymola knows; probably discrete variables). The dataClass matrix contains some info if the data_2 matrix is transposed or not, some version number for Dymola features.

Re: OM binary (mat) output file format

Many thanks.
I should have googled the query myself.

Re: OM binary (mat) output file format

Ehm,
if I understand well, the link tells how to interpret the mat file from Matlab or Octave, or when using python.
What I would like, instead, is to create my own program that reads these files. I program in C++ using Qt.
How OM writes and reads mat files? using C coding or some dll from Mathworks?

Since the files outputted by OM contain character variables the used matlab format must be later than (the very old but still used) 4.0. But which one? Where to find details of the format?

Re: OM binary (mat) output file format

You should be able to use http://www.mathworks.se/help/pdf_doc/ma … format.pdf (the last pages)
We use our own C implementation (which has a BSD-license option): https://openmodelica.org/svn/OpenModeli … _matlab4.c

Re: OM binary (mat) output file format

Good!
that is what I needed.
thank you.

Re: OM binary (mat) output file format

Good!
that is what I needed.
thank you.

There are 0 guests and 0 other users also viewing this topic
You are here: