SIMULINK not recognizing Variables defined in Annotation box

I'm using what should be a working example for a MATLAB/SIMULINK toolbox. However, variables written in an annotation box are bot recognized by the Simulink blocks (i.e. getting the "Undefined functions or variables" error). I'm using MATLAB 2018a, and I'm wondering if this is due to the version or else how can I resolve this issue so variables can be defined in the annotation?
<<
>>

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2018년 9월 26일

0 개 추천

Your assignment needs to be put in the "ClickFcn" box or check that "Use annotation text as Click callback". Also, it does require a click. Check if the variables are assigned in the workspace.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Model, Block, and Port Callbacks에 대해 자세히 알아보기

질문:

2018년 9월 26일

댓글:

2018년 9월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by