- Check whether the “MatrixB” block is configured correctly by validating its expected input dimensions with the output of “u.” Refer to the following documentation to know more about debugging signal dimensions: https://www.mathworks.com/help/simulink/ug/determining-output-signal-dimensions.html
- If the input to “u” is configurable, you can adjust the output to match the dimensions expected by “MatrixB”. This might involve changing the parameterization or gain settings at the upstream block feeding “u”.
- If “MatrixB” needs only one element from the 3-element vector, use a “Selector” block to extract the specific element required.
Error regarding Input port when using SIMULINK
조회 수: 2 (최근 30일)
이전 댓글 표시
I have system which shows error in this way.
Error in port widths or dimensions. Output port 1 of 'SMC1/LQR_Controller/u' is a one dimensional vector with 3 elements.
Error in port widths or dimensions. Input port 1 of 'SMC1/LQR_Controller/MatrixB' is a one dimensional vector with 1 elements.
Although the MatrixB is receiving the same input as u 's output. Kindly guide me how do I resolve this error.
The image of system is given below:
댓글 수: 0
답변 (1개)
Shlok
2024년 11월 30일
Hi Sameema,
The above-mentioned error indicates a mismatch in the dimensions of the signal going into and out of the blocks in your Simulink model. In the following figure, it appears that Output port of 'u' produces a 3-element vector, whereas Input port of 'MatrixB' expects a 1-element vector (or scalar).
You can follow one of the following approaches to resolve the issue:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Event Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!