Composite Signal to MATLAB Function Block
조회 수: 9 (최근 30일)
이전 댓글 표시
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)
댓글 수: 0
답변 (1개)
Kaustubha Govind
2013년 6월 14일
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.
댓글 수: 0
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!