Error on set_param SimulationCommand start - “memory allocation failed or you have no X connection”

Hey guys,
reposting the question from stackoverflow
I'm trying to launch a simulink simulation using python script ( mlabwrap as python wrapper for matlab ). I open the simulink *.mdl file using:
load_system("thermo");
I use set_param to initialize the simulation:
set_param("thermo", 'SimulationCommand', 'start');
This throws the following error:
An error occurred when changing the simulation execution status. This may occurif a memory allocation failed or if you have no X connection
If I just execute sim("thermo") everything works.
Unfortunatelly I would like to use set_param instead of sim.
How can I use set_param("thermo", 'SimulationCommand', 'start'); and run it from terminal, without X server?
I'm using Matlab2009b on Ubuntu.
EDIT:
As it turned out, if I ran the simulation logged in as a user with X server, the everything works even with set_param ...
But I still wonder, if it is possible to run the simulation, without the X server running...

回答 (0 件)

カテゴリ

質問済み:

2016 年 1 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by