How to use parameters from data dictionary in sinmulink's callback function?
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Fangjun Jiang
el 13 de Oct. de 2022
Use API to open the data dictionary and get the value, or the easiest thing to do is
2 comentarios
Fangjun Jiang
el 13 de Oct. de 2022
Did you try Simulink.data.evalinGlobal()? There is also Simulink.data.assigninGlobal()
Ver también
Categorías
Más información sobre Workspace Variables and MAT Files en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!