Why do I get the error Dimensions of arrays being concatenated are not consistent?

1 回表示 (過去 30 日間)
This is my code. How can I fix this problem?

採用された回答

Cris LaPierre
Cris LaPierre 2020 年 12 月 30 日
I'm going to guess it's because you are trying to combine 2+ arrays that have a different number of columns. Specifically, when you create b, you are combing three rows.
  • the first row has 3 elements
  • the second row has 3 elements
  • the third row and 1 element.
All rows must have the same number of elements in order to concatenate them together vertically.
  1 件のコメント
Shahab Ahmed
Shahab Ahmed 2020 年 12 月 30 日
編集済み: Shahab Ahmed 2020 年 12 月 30 日
thanks, for your answer. It helped run my code :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by