How to create an array of structs as input to an Embedded Matlab Function
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello all!
I am currently working on building a guidance-system in Simulink. The problem I'm facing now conserns how to move large amounts of data.
What I want to do is to store for a bunch of Waypoints. Each WP should ideally be a structure with elements like position, type and some metadata. Thus, I need an array of such structures.
The thing is that this shall be rendered by Simulink Coder to run on an embedded system. Thus, I can't use a non-tunable workspace parameter.
The array needs to be able to change.
I've tried using Data Storage-blocks, with the array set as initial condition to the bus. But I can't figure out how to initialise an array of busses in Simulink.
Working with array-of-busses seems a bit of a hassle in Simulink. So, is there another way for the data to be availible in the Matlab Function, but still tunable from the application C-code?
Thanks!
2 comentarios
Ryan G
el 6 de Jul. de 2012
How are you creating the array of busses as an input to the EML block? Could you post a screenshot?
The initial question sounds like you want a parameter but the second part sounds like an input so I find it a bit confusing.
Respuestas (0)
Ver también
Categorías
Más información sobre Array and Matrix Mathematics en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!