Pass parameters into and out of my standalone executable?

1 visualización (últimos 30 días)
Julian
Julian el 19 de Jun. de 2019
I need help in passing parameters into an executable. I generated a standalone .exe of my simulink model and call it inside my matlab script. I can then use the outputs from the exe by loading in the outputs from the .mat file that it creates. My problem is in passing parameters into the model. Basically the idea is something like this:
%initial parameters defined before the while loop
while(condition)
system('myexe');
load('myexe.mat');
%update parameters that are used in the simulation
end
So, I define the initial state of parameters before the while loop, then run the exe, load in the outputs and update the initial parameters again until the condition is met.
I have tried using default parameter behaviour as "inlined" and "tuneable" neither of which has worked. The exe does not recognize that the parameters are beign updated at all, it does not even use the initial settings, it simply uses whatever the last value was when I run it.
I need the parameters to be updated after the .exe is run, then rerun the .exe with updated parameters. I have seen other threads where parameters are being updated while the exe is running but that is not what I need.
If anyone has any ideas it would be greatly appreciated.

Respuestas (0)

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by