Adding elements to a 2D array

92 visualizzazioni (ultimi 30 giorni)
Shady Elsayed
Shady Elsayed il 11 Mag 2020
Commentato: Shady Elsayed il 11 Mag 2020
Suppose matrix A=[ 1,2 ; 3,4 ; 5,6]
Matrix B=[ 7 , 8 ]
whever I use C=[A,B] I receive this error message
Error using ==> horzcat
CAT arguments dimensions are not consistent.

Risposta accettata

the cyclist
the cyclist il 11 Mag 2020
C = [A; B]
  1 Commento
Shady Elsayed
Shady Elsayed il 11 Mag 2020
Oops forgot about that, now it worked! Thanks very much

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by