1

OpenModelica-Matlab-Interface [closed]

Hi. I'm trying to use and interface between Matlab and OMEdit. I found this one (https://es.mathworks.com/matlabcentral/ … function). An example code is within the download. However I can't get the same results like the autor did with the code given. (You can see the results in the pdf file called plot). I understood that using "omcompile(hello.mo,'modelname')" I get a model compiled in Matlab. Then I can simulate it (omrun(modelname)) and see the results with "omimport(modelname)". So I could re-simulate this model many times as I want without use OMEdit again. The files need one matrix, "HelloWorld.test_res.mat" to execute some commands. The command "omrun(modelname)" deletes that matrix and it don’t create a new one, but the next command (omimport(modelname)) needs this matrix to load the results into Matlab.

I did some changes into the files but I couldn’t make the example works. I can use it to see the results I simulated in OMEdit, but if I tried to change the parameter “a” through Matlab (omparameter), the parameter doesn’t change and I always see the same.

I'd appreciatte the help that you could give me.

Adrian's avatar
55
Adrian
asked 2018-04-06 15:13:00 -0500
edit flag offensive 0 remove flag reopen merge delete

Closed for the following reason "the question is answered, right answer was accepted" by Adrian 2018-04-11 03:45:08 -0500

Comments

add a comment see more comments

1 Answer

0

This interface is old. There is a new one (https://github.com/OpenModelica/OMMatlab) but is still in development. I'll close the question.

Adrian's avatar
55
Adrian
answered 2018-04-11 03:44:47 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments