How to correct error in port width or dimension in simulink ?
Show older comments
I am getting the following port dimension errors when I try to run my simulink model:
"Invalid setting for input port dimensions of 'CONT_assignment/Demux1'. The dimensions are being set to [-1]. This is not valid because the total number of input and output elements are not the same"
"Error in port widths or dimensions. Invalid dimension has been specified for output port 1 of 'CONT_assignment/Transfer Fcn'."
Here is an image of the model. It's a simple PID controller model. The controller gain values are specified in a .m file as global parameters.

Does anyone have a solution for this ?
1 Comment
Guy Rouleau
on 20 Sep 2024
See my analysis of this question here: How to correct errors in port width or dimension in Simulink? » Guy on Simulink - MATLAB & Simulink (mathworks.com)
Accepted Answer
More Answers (2)
Achille Jacquemond
on 16 Jun 2018
0 votes
1 Comment
Amru Al Ghafri
on 22 Mar 2020
Hi
I have same problwm, how did you managed to sort it out
Guy Rouleau
on 20 Sep 2024
0 votes
See my analysis of this question here: How to correct errors in port width or dimension in Simulink? » Guy on Simulink - MATLAB & Simulink (mathworks.com)
Categories
Find more on Subsystems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!