How to get rid of the error: Error using horzcat. Dimensions of matrices being concatenated are not consistent

8 ビュー (過去 30 日間)
  1 件のコメント
the cyclist
the cyclist 2024 年 5 月 27 日
We can't work with a screen shot. Please post or attach the code that replicates the problem.

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

回答 (1 件)

Image Analyst
Image Analyst 2024 年 5 月 27 日
In general, this error means that the matrix you're trying to concatenate on the right hand side of your existing matrix does not have the same number of rows as your existing matrix.
C = [A, B]; % A and B MUST have the same number of rows or you get an error.

カテゴリ

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