Using complex structure in simulink constant block

조회 수: 2 (최근 30일)
Sergey Kasyanov
Sergey Kasyanov 2020년 1월 17일
댓글: Sergey Kasyanov 2020년 1월 20일
Hello,
I know that there is way to pass structure to simulink model as bus object but what should I do if i need to pass complex structure with structures as fields?
Example of structure:
Structure.A.a=1;
Structure.B.a=2;
Are there any another way to pass complex set of data to simulink model without accessing it to block parameters?

채택된 답변

stozaki
stozaki 2020년 1월 18일
편집: stozaki 2020년 1월 18일
Hello,
Please try attached model.
  1. execute bus object definition file.
  2. Simulate model.
MathWorks dcoumentation : Simulink.Bus.createMATLABStruct
Regards,
stozaki
  댓글 수: 3
stozaki
stozaki 2020년 1월 20일
Thank you for checking.
I cannot describe future releases in MATLAB Anser. We appreciate your understanding.
I understand your opinion that scripting is complicated.
Bus nested can be created graphically using the Bus Editor. You can automatically generate a bus definition file from the Bus Editor.
Regards,
stozaki
Sergey Kasyanov
Sergey Kasyanov 2020년 1월 20일
I can not use GUI because I am working with complex structures)
I worry about program approach to that problem because it is working only if I have structure with no repeating fields. If I want to create bus:
A.A.A.a=1;
A.A.B.d=1;
A.B.A.b=1;
A.B.B.c=1;
...% and so on
what should I do?
Can I send offer to developers to fix that situation?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by