Port dimensions error out of nowhere

1 visualizzazione (ultimi 30 giorni)
Simon Detmer
Simon Detmer il 22 Lug 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 Commento
Jesús Zambrano
Jesús Zambrano il 2 Set 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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Prodotti


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by