HOW TO PUT ONE MATRIX UNDER ANOTHER AND MAKE IT A SINGLE MATRIX
3 次查看(过去 30 天)
显示 更早的评论
I HAVE MATRIX A AND B AND I HAVE TO CREATE C USING A AND B. WHAT COMMAND DO I NEED. ALSO I HAVE N NO. OF MATRIX THAT I NEED TO STICH LIKE THIS WAY.
A = [1 2 3;4 5 6;7 8 9]
B = [1 2 2;2 2 2;1 1 1]
C = [1 2 3;4 5 6;7 8 9;1 2 2;4 5 6;7 8 9]
0 个评论
采纳的回答
DGM
2021-11-30
A = [1 2 3;4 5 6;7 8 9]
B = [1 2 2;2 2 2;1 1 1]
% concatenate
C = [A; B]
% or
C = cat(1,A,B)
0 个评论
更多回答(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!