How to create a matlab variable of datatype struct in the data dictionary derived from a Simulink.Bus containing an enumeration

조회 수: 19 (최근 30일)
I want to add a matlab variable with dataytpe struct to the data dictionary to initialize a Simulink.Bus in the model. The Simulink.Bus contains an enumeration which is also defined in the data dictionary.
For simple Simulink.Buses without enumerations I have used the solution described here
For Simulink.Buses containing other Simulink.Buses I have extended the linked solution. But I do not get this solution working with enumerations because I'm not able to copy these enumerations to the base workspace.
Does anyone have an idea how to solve this?

답변 (1개)

Sebastian
Sebastian 2023년 10월 10일
Sorry I only checked the second answer. Using the correct scope parameter works
BUS_NAME_MATLABStruct = Simulink.Bus.createMATLABStruct(obj, pStruct, dims, scope);

카테고리

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

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by