Port dimensions error out of nowhere

1 Ansicht (letzte 30 Tage)
Simon Detmer
Simon Detmer am 22 Jul. 2020
Kommentiert: Jesús Zambrano am 2 Sep. 2020
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 Kommentar
Jesús Zambrano
Jesús Zambrano am 2 Sep. 2020
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by