Sum of matrix signals in Simulink
1 次查看(过去 30 天)
显示 更早的评论
I am performing 'B = B +dB' in simulink. 'dB' is calculated using a matlab function block. Size of B and dB are identical and I have cross-checked it multiple times.
Size of B is 1*5.
Size of dB is also 1*5.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/281173/image.png)
I am implementing like above. But I am getting the following error w.r.t. to the output of the function block. dW1 is connected to output port 3 of the function block.
This function does not fully set the dimensions of output port 3.
Please help me with this.
0 个评论
回答(2 个)
J Chen
2020-4-1
Something wrong with the dB that comes in from Inport 2. The picture shows Inport 2 has a dimension of 1 instead of 5.
Fangjun Jiang
2020-4-1
In your MATLAB Function block, open the editor, click "Edit Data" icon, find the data for output 3, set the size.
Or, in your Simulink model, press ctrl+H, navigate to find the MATLAB Function block, find the data for output 3, set the size.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!