Adding elements to a 2D array

86 次查看(过去 30 天)
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.

采纳的回答

the cyclist
the cyclist 2020-5-11
C = [A; B]

更多回答(0 个)

类别

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