- https://www.mathworks.com/help/simulink/ug/work-with-array-of-buses-signals.html
- https://www.mathworks.com/help/simulink/slref/selector.html
- https://www.mathworks.com/help/simulink/ug/parameter-values-and-specification-methods.html
Structure Member Array Index Selection using Selector
조회 수: 1 (최근 30일)
이전 댓글 표시
How to Define in Simuling Block as Struct memeber Array
typedef struct
{
unsigned int A[2];
unsigned int B[2];
}Base_S;
Base_S l_timer_Check[2]={ {10,12},{4,5}};
void fn_output_Time()
{
int check_Timer;
check_Timer= l_timer_Check[1].A[1];
}
Out Put is came as only check_Timer= l_timer_Check[1].A;
How to Resolve it as check_Timer= l_timer_Check[1].A[1];
댓글 수: 0
답변 (1개)
Kartik Saxena
2024년 1월 10일
Hi,
I understand that you want to define Simulink block programmatically through your code.
The following example from MathWorks documentation illustrates the same:
Since you are using the Bus Selector block, these are some other MathWorks documentations that would help you regarding the same:
I hope this resolves your issue.
댓글 수: 0
참고 항목
카테고리
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!