# How to sum matrix of different size on Simulink? (R2019a)

4 views (last 30 days)
Rubem Pacelli on 17 Mar 2020
Edited: Rubem Pacelli on 9 Aug 2020
I have this block in my system: The expected behavior is to perform as it's done on Matlab. How can I solve this problem?
PS1: I know that it seems pretty stupid. But maybe I'm pretty stupid.
PS2: I searched. Really.

Rubem Pacelli on 20 Apr 2020
Edited: Rubem Pacelli on 9 Aug 2020
I found out what is going on. It turns out that there is a specific block to sum a vector along a multidimensional matrix. These blocks are called:
Array-Vector subtract
Array-Vector multiply
Array-Vector divide
It can do any basic operations that I was looking for.

BobH on 17 Mar 2020
The dimensions must agree, in MATLAB.
Z = zeros(400,32);
O = ones(1,32);
Z+O;
Error using +
Matrix dimensions must agree.
O = ones(400,32);
r = Z+O;
size(r)
ans =
400 32
madhan ravi on 18 Mar 2020
BobH if you could see in each thread of the question there is a specific field named Release for the OPs to fill in the version they use.

R2019a

### Community Treasure Hunt

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

Start Hunting!