Simulink matrix multiply, dimension error
Below is a small part of my Simulink model. The function is only a repmat that repeats the vector into 9 rows. When the matrix multiply is doing a "matrix" multiplication, all is good and I get a 9×9 matrix out.
I then need to change the Matrix Multiply to do "element-wise" multiplicaton. So, I remove uT and change the property to element-wise.
But as you can see, it fails to run and I get the below error message which does not make sence because it fails on the exact dimensions that are expected of it:
The only caveat to this whole scenario is that both the data that goes into Transpose2 and into "Matrix Multiply" is actually a 3D data in the form of 394x1x22 and 9x394x22, respectively. So, initially I thought it could be that Simulink mixes up this 3rd dimension somehow. However, this 3rd dimension exists in the rest of my model and Simulink is happy with it AND when I change the element-wise to matrix-multiplication again, Simulink is happy. So, I cannot see how that 3rd dimension will only go wrong in this specific scenario that I am interested in, i.e. element-wise multiplication.
Any ideas are greatly welcome.Below is a small part of my Simulink model. The function is only a repmat that repeats the vector into 9 rows. When the matrix multiply is doing a "matrix" multiplication, all is good and I get a 9×9 matrix out.
I then need to change the Matrix Multiply to do "element-wise" multiplicaton. So, I remove uT and change the property to element-wise.
But as you can see, it fails to run and I get the below error message which does not make sence because it fails on the exact dimensions that are expected of it:
The only caveat to this whole scenario is that both the data that goes into Transpose2 and into "Matrix Multiply" is actually a 3D data in the form of 394x1x22 and 9x394x22, respectively. So, initially I thought it could be that Simulink mixes up this 3rd dimension somehow. However, this 3rd dimension exists in the rest of my model and Simulink is happy with it AND when I change the element-wise to matrix-multiplication again, Simulink is happy. So, I cannot see how that 3rd dimension will only go wrong in this specific scenario that I am interested in, i.e. element-wise multiplication.
Any ideas are greatly welcome. Below is a small part of my Simulink model. The function is only a repmat that repeats the vector into 9 rows. When the matrix multiply is doing a "matrix" multiplication, all is good and I get a 9×9 matrix out.
I then need to change the Matrix Multiply to do "element-wise" multiplicaton. So, I remove uT and change the property to element-wise.
But as you can see, it fails to run and I get the below error message which does not make sence because it fails on the exact dimensions that are expected of it:
The only caveat to this whole scenario is that both the data that goes into Transpose2 and into "Matrix Multiply" is actually a 3D data in the form of 394x1x22 and 9x394x22, respectively. So, initially I thought it could be that Simulink mixes up this 3rd dimension somehow. However, this 3rd dimension exists in the rest of my model and Simulink is happy with it AND when I change the element-wise to matrix-multiplication again, Simulink is happy. So, I cannot see how that 3rd dimension will only go wrong in this specific scenario that I am interested in, i.e. element-wise multiplication.
Any ideas are greatly welcome. simulink, matrix MATLAB Answers — New Questions