0
votes

I am running a Simulink model from the command line using the sim() command. I also activated the Save data to workspace in my scopes. The simulation runs without problems but the variables are not saved by the scope. Note that if I start the simulation using the play button from my simulink model, data is saved to the workspace.

1
How do you call the sim command? Simply with sim(my_model) or with an output argument, such as SimOut = sim(my_model);?am304
@am304, I tried both of them. With SimOut = sim(my_model) , the variable SimOut is created but it's emptyuser2536125

1 Answers

2
votes

The comment from @am304 gave me a start point. One has to use

SimOut = sim(my_model);
x=SimOut.get('VariableName')

and problem solved