How to get rid of the error: Error using horzcat. Dimensions of matrices being concatenated are not consistent
조회 수: 8 (최근 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!