How to use parameters from data dictionary in sinmulink's callback function?
조회 수: 17 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
답변 (1개)
Fangjun Jiang
2022년 10월 13일
Use API to open the data dictionary and get the value, or the easiest thing to do is
댓글 수: 2
Fangjun Jiang
2022년 10월 13일
Did you try Simulink.data.evalinGlobal()? There is also Simulink.data.assigninGlobal()
참고 항목
카테고리
Help Center 및 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!