How to update function's variables each sample time

I created a matlab function which implements DMC controller as shown , the problem is there are few vectors inside the function needs to get updated each sampling time , So is there a way to save data after each sampling time to be used for the next ones?
note: " save " function is not supported in simulink's code generation for some reason

 채택된 답변

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Model Predictive Control Toolbox에 대해 자세히 알아보기

질문:

2019년 9월 3일

답변:

2019년 9월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by