How can I run a M-file with Simulink model in the same time and this M-file takes Simulink model data from workspace per each time step ?

Dear All,
I need an urgent help from you.
I am working in PhD research to interface between MATLAB/Simulink and JADE (Java agent Environment Development) software. To link between them must be there a M-file (interface) transfers data between them for each time step from MATLAB workspace to JADE.
My question, How can I run a M-file with Simulink model in the same time and this M-file takes Simulink model data from workspace per each time step ?
Thank you so much and I am waiting your response.
Best Regards, Mohammed

 Accepted Answer

2 Comments

Dr. Azzi Abdelmalek, thank you so much.
But now, How can I pause and continue running of the Simulink model by Interpreted Matlab function block or Matlab function block at certain times during Simulation-Domain?
Try the command pause inserted in your function, you can get the time by the clock block

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!