Nested Structures using Buses in Simulink
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello again, I have another question on the same line.
Finally I managed to create nested structures with buses, the point is that when I use the Simulink.Bus.createMATLABStruct('Buses') command the resultant structure is like this:
Nested_Struct: [1x1 struct]
Number_Nested_Structures: 20
Param_A: 0
Param_B: 0
Insted of what I want which is:
Nested_Struct: [1x20 struct]
Number_Nested_Structures: 20
Param_A: 0
Param_B: 0
I do not need to use the Simulink.Bus.createMATLABStruct for anything, it is just to illustrate. What I want to do is access through a S-function block or an emedded matlab block to differents indexes of the Nested_Struct, depending on certain conditions.
Note: The number of nested structures change dynamically.
By the way I'm using Matlab 2010a.
Thank you very much.
PS: Which will it be the best block or way to load data in the model for the second structure?.
댓글 수: 0
답변 (1개)
Andres
2011년 6월 16일
댓글 수: 2
Kaustubha Govind
2011년 6월 16일
Have you found the answer to this question? If note, it might help to give us a simple example of a bus structure - why is the Bus Selector block not sufficient?
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!