Composite Signal to MATLAB Function Block
이전 댓글 표시
I have an output bus that contains 1-D and 2-D signals. I need to feed that bus to real-time software that only accepts 1-D signals. How can I first determine which signals are 2-D and then reshape the 2-D signals into a 1-D array? Since the MATLAB Function block does not accept 2-D signals, I cannot think of another way to approach this issue. The obvious answer would be to decompose the bus with a bus selector/demux but this particular bus contains a large amount of signals - enough to strongly discourage the use of a signal routing block. (2012b)
답변 (1개)
Kaustubha Govind
2013년 6월 14일
0 개 추천
I presume you are using the (Interpreted) MATLAB Function block. You can use the (Embedded) MATLAB Function block with bus signals, as long as they are non-virtual buses. Please see Attach Bus Signals to MATLAB Function Blocks. You will need to create Simulink.Bus objects for both input and output structure types.
카테고리
도움말 센터 및 File Exchange에서 Signal Attributes and Indexing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!