How to get rid of the error: Error using horzcat. Dimensions of matrices being concatenated are not consistent
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens

1 commentaire
the cyclist
le 27 Mai 2024
We can't work with a screen shot. Please post or attach the code that replicates the problem.
Réponses (1)
Image Analyst
le 27 Mai 2024
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 commentaires
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!