Is there an example of using SET_PARAM command in a MATLAB file S-function to update a parameter of any block in the model?

I have a Rate Limiter block in my model and I would like to change the Initial Condition parameter externally while the simulation is running. I am aware that I can use SET_PARAM command in MATLAB file S-function to change the parameter value. I would like to an example demonstrating this usage.

 채택된 답변

You can change the value of a block paramter using SET_PARAM command in the Output function of a MATLAB file S-function. Take a look at the attached model and S-function which demonstrates changing the Initial Condition of the Rate Limiter block to the Amplitude value of the Sine Wave block.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

릴리스

R14SP1

Community Treasure Hunt

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

Start Hunting!

Translated by