Breakdown the matrix signal into individual signals in Simulink

2 views (last 30 days)
I have a signal "a_x" which is a matrix that includes 3 signals a_1, a_2,a_3. for further computation, I need to use these signals. Secondly, is it possible without writing any .m file?
Also , how to implement a matrix signal? Is it like a bus or anything else?

Answers (1)

Jonas
Jonas on 17 Feb 2021
If you have a vector signal with three elements, you can extract those elements using the Demux block. The Mux block allows creating a vector of signals.
In order to create a matrix signal, you can use the Matrix Concatenate block. This allows you to combine vectors across the second dimension.
The usage of a Bus is also possible, but more complex because you need to maintain its structure. It is used when you want to combine signals with different data types and dimensions together. If you want to create a simple matrix of same data type and scalar dimension, use Mux and Matrix Concatenate. Also, you cannot perform simple computations on a Bus as a whole, which you can do with a matrix signal.

Products


Release

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!