I was running Simulink from the main script with FastRestart and avoiding the use of simset and all was good.
However, after enclosing the script in a function so that I can call it from a different script for different input data, I now get an error related to the workspace. Basically, Simulink is no longer able to access the workspace within the function.
I have found solutions on-line using simset, but this is not an option in my case. Assuming sfile is my Simulink file, I first load the system
and then set-up the FastRestart settings
Now, the error occurs on this last line, i.e. when I am updating the Simulink file. Basically, Simulink returns an error because it does not recognize mdl.tStep, i.e. the step size length, as a structure because it is not specified. In fact, it is because it is in the workspace.
So, my question is how I can sort out this problem. Is it possible to use set_param to change the workspace now that simset is deprecated? Or should I rather set all variables through set_param individually?