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
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개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!