Hello,

I am looking for a method in Simulink to select between two matrices of different sizes (in this case a 2x3 and 3x3 matrix) which can pass the Programmable Logic Controller (PLC) requirement of fixed size output.

In the example attached, I tried using multiport switch, but it will only work when I enable variable size, which makes the approach incompatible with PLC. I cannot add zeros to make the matrices of the same size, because this will affect a part of my Simulink block downstream. Is there any possible solution/workaround for this method?

PS: I cannot use m-code for this purpose as it is not compatible with the PLC hardware target I plan to use.

More Aditya Venkataraman's questions See All
Similar questions and discussions