Error:Error in port widths or dimensions. Output port 1 of '<hidde​n_inserted​_signal_sp​ecificatio​n_block&gt​;' is a one dimensional vector with 1 elements.

8 views (last 30 days)

Answers (1)

Shlok
Shlok on 2 May 2025
Hi Pratik,
I get that you're running into an error about port widths or dimensions. This usually happens when there's a mismatch between signal dimensions such as feeding a vector into a block that expects a scalar. In your model, the "Mux" block is outputting a 1×3 vector by combining three scalar signals, but the downstream block appears to expect a scalar or a 1×1 signal. Simulink tries to resolve this mismatch automatically by inserting a hidden signal specification block, but in this case, it fails, leading to the error.
To fix this issue, you can:
  • Modify the downstream block to accept a 3-element vector, if that’s the intended behavior.
  • Use arithmetic or logical expressions to compute a single scalar output instead of combining all signals into a vector.
Refer to the following MATLAB Answer to learn more about the error involving a hidden signal specification block:

Categories

Find more on Modeling in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!