How to create an array of structs as input to an Embedded Matlab Function
1 view (last 30 days)
Show older comments
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 Comments
Ryan G
on 6 Jul 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.
Answers (0)
See Also
Categories
Find more on Array and Matrix Mathematics in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!