I have a code that uses optimvar and optimproblem functions that i have made in a .m file and that i want to recreate fur use in a simulink model to be used in a real time model.
Unfortunately the MATLAB Function block does not support these functions. Is there a way to get it to run them or alternatively, is there a way to call a .m file during the running of the simulink model? As far as i can tell the callback functions are only really useful for starting or ending a model, not running on each step.