Can I use an array of Simulink Buses as the initial state of a memory block?

조회 수: 2 (최근 30일)
I have a Simulink Bus (MyBus) that has a field (a_bunch_of_sub_buses) that is an array of type SubBus. If I try to use this in a Memory block, Simulink simply says that the Memory block has an invalid parameter x0 -- the initial condition. Can I not use a bus with an array of buses inside of it as the parameter of a Memory block, or am I doing something else wrong?

채택된 답변

Tucker McClure
Tucker McClure 2019년 2월 20일
편집: Tucker McClure 2019년 2월 20일
Ok, in the documentation, under "Integrate C Functions Using Legacy Code Tool", there's a Supported Data Types table, where it says that "Array of Simulink.Bus" is supported for input and output, and for work vectors, but not for parameters. I assume the initial condition of a memory block is a "parameter". It's unclear if this applies though since it's on a page about integrating C code, and that's not what I'm doing. That is, does the "Supported for Parameters?" column on this page just refer to s-functions, or does it apply more generally?
The following question is similar and contains an answer that says that what I'm trying to do is not supported, though it doesn't cite any sort of documentation:
The solution suggested there (use a bunch of memory blocks and concatenate them manually), however, doesn't work for my application.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by