Error in port widths or dimensions

5 ビュー (過去 30 日間)
Stéphanie Monteiro
Stéphanie Monteiro 2021 年 5 月 26 日
コメント済み: Jesús Zambrano 2021 年 5 月 27 日
Hello guys,
I'm new in Matlab/ Simulink and I'm having errors that I cannot solve.
I need help.
The fist errors that I received were:
Error in port widths or dimensions. Output port 1 of 'Model/Drivers/Segment_Pos_Vel_Ori' is a one dimensional vector with 702 elements.
Error in port widths or dimensions. Input port 2 of 'Model/Drivers/BIC_ln_path' is a one dimensional vector with 468 elements.
Before the Segment_Pos_Vel_Ori I inserted one signal specification to specify the signal to 1 and the error now is:
Error in port widths or dimensions. Output port 1 of 'Model/Drivers/Segment_Pos_Vel_Ori' is a one dimensional vector with 1 elements.
Error in port widths or dimensions. Input port 2 of 'Model/Drivers/BIC_ln_path' is a one dimensional vector with 468 elements.
Thank you !!

採用された回答

Jesús Zambrano
Jesús Zambrano 2021 年 5 月 27 日
If Output port 2 goes to Input port1, then you have a conflict due to the dimensions. Including a signal specification will not solve the problem. In this case, you need to select which 468 of the 702 elements from Output port 1 should go to Input port 2. For this this you can use a Selector block, found in Signal Routing library (here, Input port size is 702, and then in Index you define the elements. For example, the first 468 elements would be [1:468]).
Hope it helps!
  2 件のコメント
Stéphanie Monteiro
Stéphanie Monteiro 2021 年 5 月 27 日
Thank you !! It solve the error.
Jesús Zambrano
Jesús Zambrano 2021 年 5 月 27 日
Excellent!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSignal Import and Export についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by