필터 지우기
필터 지우기

"Hidden" variables after running Simulink model with Matlab function

조회 수: 3 (최근 30일)
hbot
hbot 2014년 9월 16일
I'm working with a Simulink model that uses a Matlab function saved in m-file. The function is called during simulation with the help of the "Interpreted Matlab function" block. I noticed, that after the first simulation, the second simulation has non-default (non-zero/non start-up) initial values for the variables, which are used in the Matlab function. These values correspond to the final values of the first simulation. So somehow the variables are saved somewhere inside of Matlab, but not seen in the Workspace. These variables are local to the m-file function, i.e. no additional statements like persistent or global are used for them. I also found out, that if I execute the clear('functions') command before running the second simulation, the Simulink model uses then the default (zero/start-up) variables. How can I see those "hidden" variables and how can I clear them without using clear('functions') command? This command also clears all breakpoints, what I don't like.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by