How to access structure elements in the stateflow charts
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have created struture called carconfiguration which has five elements( Ato E). and i need to feed this carconfiguration as input to stateflow chart. so after creating the structures def in m file i save and ran the m file so now the CarConfig struct is created. but inside the stateflow chart when try to access the elements of the struture like below,
CarConfig == CarConfig.C(I need the third config so i am using C here) i am getting error as the element C is not found or unresolved elements C.
Can anyone help me how to access the structure elements inside the stateflow charts.
1 comentario
Ntiana Sakioti
el 1 de Jul. de 2021
Are you able to provide the structure definition file as well as how you defined CarConfig in your chart?
Respuestas (1)
Mark McBroom
el 17 de Feb. de 2024
- You will need to create a Simulink.Bus with the same layout as the matlab structure.
- Create a Simulink.Parameter called CarConfig. Set its "Value" property to carconfiguration. Set it "Type" property to the Simulink.Bus created in step 1.
- In Stateflow, create a Parameter called CarConfig in the Stateflow
0 comentarios
Ver también
Categorías
Más información sobre Complex Logic 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!