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
  • Index
  • » Users
  • » MrMark
  • » Profile

Posts

Posts

I have two simulation result files, result_run_1.mat and result_run_2.mat.
Each file contains two variables, SomeVar1 and SomeVar2.

I would like to plot one variable from each file and have them both appear on the same plot.
This is easy to do in OMEdit by simply opening both result files and clicking the desired variables in the Variables Browser window, but I would like to do this from a .mos script.

I have tried:

Code:


plot(SomeVar1,fileName="results_run_1.mat");
plot(SomeVar1,fileName="results_run_2.mat");

This results in a single plot that only contains the latter variable ( SomeVar1 from results_run_2.mat)

I also tried:

Code:


plot(SomeVar1,fileName="results_run_1.mat");
plot(SomeVar1,fileName="results_run_2.mat",externalWindow=true);

This results in a single OMPlot window with two tabs, each tab contains a plot of one of the variables.

Does anyone know how to do this?

Thanks
Mark

Note:
I am currently running v1.11.0(64-bit) on windows 7 professional.

  • Index
  • » Users
  • » MrMark
  • » Profile
You are here: