Is matrix multiplication with empty matrix in simulink impossible?
조회 수: 4 (최근 30일)
이전 댓글 표시
I am trying to run a simulation in which (based on the settings) certain channels are unused. As I want to be able to change the settings without changing the simulink file, certain channels are still there but should carry an empty vector (size 0 by 1). However, in creating this empty vector using a gain block in matrix multiplication mode (0 by n gain matrix times n by 1 signal) the following error occurs: Invalid setting in '.../Gain' for parameter 'Gain'.
My main question is thus: Is it impossible to do a matrix multiplication which results in an empty matrix in simulink?
Furthermore, I would also like to know whether there are alternatives to using a gain, that do allow you to get an empty vector on a simulink channel.
One alternative I have tried is to move this matrix multiplication into an enabled subsystem such that it is only executed when the result is not empty. However, the error still occurs. A minimal example of this is attached.
댓글 수: 2
dpb
2020년 10월 22일
I don't have and have never even seen a Simulink installation, but I can certainly imagine operations on null element aren't allowed.
Would seem to me from what I know of Simulink that you would simply set the outputs of the given channels to 0, not try to make them disappear.
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!