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

2 次查看(过去 30 天)

回答(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 CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by