How to get rid of the error: Error using horzcat. Dimensions of matrices being concatenated are not consistent
2 次查看(过去 30 天)
显示 更早的评论
1 个评论
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
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!