How to use parameters from data dictionary in sinmulink's callback function?
이전 댓글 표시
i have a simulink model , and Desing data defined in Data Dictionary. now i want to initialize a variable by parameters from data dictionary in initFcn function. but it doesn't work:
Undefined function or variable 'x'. Variable 'x' does not exist.
what should i do?
답변 (1개)
Fangjun Jiang
2022년 10월 13일
0 개 추천
Use API to open the data dictionary and get the value, or the easiest thing to do is
댓글 수: 2
Joe
2022년 10월 13일
Fangjun Jiang
2022년 10월 13일
Did you try Simulink.data.evalinGlobal()? There is also Simulink.data.assigninGlobal()
카테고리
도움말 센터 및 File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!