Thank you for implementing S-function as it becomes very easy to implement everything on Simulink. However, it would be very helpful if we can retrieve some more information from S-function controller for analysis and debugging.
To be specific, I am looking to get Cost function value, full horizon of state and input and all the times. Only full horizon will be enough to calculate Cost function value manually. I was looking into the files from which S-function is generated to make changes myself for my work but it didn’t seem straightforward.
It would be really appreciated if you could add these functionalities or could specify the sections of code where we can make changes to extract information.