How to run both simulink models at a time from matlab command line

202 views Asked by At

I have two simulink models (say X and Y), I should first run X, and after few seconds(lets say 10sec), I need to run Y when X is already in execution phase. And this has to be done from matlab command line. I have tried using set_param(), but unable to do the simulations as expected.

Can someone help with that?

1

There are 1 answers

0
ErikP On

One solution could be to include both models as part of a supermodel using model blocks and put the model block that is to be delayed inside an enabled subsystem that is switched on after 10 seconds (using a delay mechanism for the enable).

Depending on what you want to do, you could also execute separate matlab processes and implement some sort of shared trigger (file, socket communication, etc.), but then that's kind of outside the realm of simulink, and you will get asynchronism.