File Exchange

image thumbnail


version (15.1 KB) by Christian Schaad
Compiles, runs, imports openmodelica models.


Updated 11 Jul 2012

View Version History

View License

Some Matlabfunctions to compile, run and import solutions of OpenModelica.
Example script to produce a parameter variation of a simple test model.
Requires installation of OpenModelica...

Cite As

Christian Schaad (2020). OpenModelica-Matlab-Interface (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

Fabian Weber

Hello I try to use your interface.
I got the follwing messege by running the on_mat_example.m script.

stdout | warning | simulation_input_xml.c: Error: failed to read the XML file HelloWorld.test_init.xml: not well-formed (invalid token) at line 91
assert | debug | see last warning

ans =


Error using load
Unable to read file 'HelloWorld.test_res.mat'. No such file or directory.

Error in omimport (line 11)
load ([modelname,'_res.mat']);

Error in om_mat_example (line 30)
omimport(modelname); % Read results into Matlab Workspace

I use Matlab R2016b and OpenModelica1.13.264bit.

thank you for your help.


Useful things. Is there an option the other way around? To import data from MATLAB into OpenModelica without a Dymola (commercial) interface? May not be the right place to ask this question, just wondering...


On windows gives the following error when compiling the model of the example (file omcompile line 90):

>> system([win_om_path,'omc.exe +s simo.mos'])
"Unknown model in instantiateModel: HelloWorld.test
ans =

any idea?


The above link to newer versions is dead. Is there a version available that works with OpenModelica 1.8.1 ?

Wolfgang Ulmer

Had no time yet to test it but newer versions can be found under

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!