Simulink: How can I find the where the signal dimensions of a signal are defined?
11 views (last 30 days)
Show older comments
Hello,
I would like to know if there is a way to find the block/port/... that defines the signal dimensions of other signals 'downstream' (with the -1 setting). I have quite a big model with some large feedback loops and I'm unable to find, in one of these loops, where the signal dimension is set.
Ultimatelly, what I want to do is to convert a vector from a two-dimensional (2-D) signal -[3x1] as specified by simulink- into a one-dimensional (1-D) signal -(3) as specified by simulink-.
I know I can introduce a reshape block, but I would like to trace the origin of the issue if possible.
Thank you.
0 Comments
Answers (1)
Fangjun Jiang
on 10 Jan 2024
Select your signal, find its source block where the dimension of this signal is specified as -1. There might be multiple input signals or parameters that could have impact on the dimension of your signal. For example, a 1x1 signal goes through the Gain of [1 2 3] would become a 1x3 signal. You have to trace each of those signals or parameters to find the critical one.
In general, in Simulink, the signal dimenstion of 1x3 and 3x1 are inter-changable but it would be better to define it as [3], instead of [1,3] or[ 3,1], if it is specifically specified somewhere.
2 Comments
Fangjun Jiang
on 10 Jan 2024
Dimension 3x1 and 3 are not the same in Simulink. Whereever in your model it is specified as 3x1, change it to be 3.
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!