Should I use system update block or RTW S-function?

I want to add a new coding after my MPC controller to do some parameter updating. So, should I use system update block or RTW S-function to implement my update coding?
Where can I find tutorial on the use of custom code system update?

 Accepted Answer

Do you mean that you want to update the parameter value during execution? I don't think this is possible, because you are trying to use parameters as signals. See http://blogs.mathworks.com/seth/2011/03/08/how-do-i-change-a-block-parameter-based-on-the-output-of-another-block/

More Answers (0)

Categories

Find more on Model Predictive Control Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!