MATLAB: How to run a simulink model from Python script

pythonsimulink

Hi, I'm trying to write a script in Python that generate number of inputs, and use them as inputs in a Simulink model. My doubt is how to run a Simulink model from Python (I'm working in windows). Could someone help me?
Thanks

Best Answer

You may consider MATLAB Engine API for Python:
For example:
>>>import matlab.engine
>>>eng = matlab.engine.start_matlab()
>>>eng.sim("vdp")
Related Question