Importing elements of a structure from MATLAB workspace based on a user given constant in Simulink.
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have various structures in my MATLAB workspace. Each of them consists of 6 fields of 'double' type. I want to pass one of these structures to a function in simulink based on what value is selected for a particular constant.
Example:
I have two structures labelled ABC and DEF. ABC has 6 fields called ABC.a, ABC.b, ABC.c, ABC.d, ABC.e and ABC.f. Same goes for DEF.
Now if user inputs constant 1 in a user input block in simulink, I want to pass the structure 'ABC' to a matlabfunciton block in simulink otherwise i wanna pass structure 'DEF'.
What would be an efficient way to do it?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!