How to create an array of structs as input to an Embedded Matlab Function
조회 수: 1 (최근 30일)
이전 댓글 표시
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
Ryan G
2012년 7월 6일
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.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!