Port dimensions error out of nowhere

1 次查看(过去 30 天)
Hello,
so I've been using a .slx for a few weeks now, and today, without changing anything in the model, this error pops up:
Error in port widths or dimensions. 'Output Port 1' of 'Modell/Lageregelung/MATLAB Function' is a [3x3] matrix.
But the output is and has been a 3x1 vector.
Now if I insert a new Matlab function block with the following code
function FB = fcn(FL)
FB = FL;
which should just pass through the input, I get
Size mismatch (size [1 x 1] ~= size [3 x 1]).
For some reason Matlab expects FB to be 1x1, even though the size of FB is set to -1.
I have an older version of the .slx, and it works, even though I can't spot a difference anywhere.
I fixed the problem by setting the size of FB to 3 in the, but I would like to know what the issue is, since it cost me at least an hour of time.
  1 个评论
Jesús Zambrano
Jesús Zambrano 2020-9-2
If you include more details of what the Modell/Lageregelung/MATLAB Function is about and the screenshot of the model that function is placed, you might get help. Otherwise, it'll be difficult to detect the reason of that error message.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by