Combine 2 matrices into a single column matrix
1 次查看(过去 30 天)
显示 更早的评论
I have two matrices, 5 x 1 and 6 x 1. I want to combine them into a single matrix that is 11 x 1. is there an easy way to do this?
0 个评论
采纳的回答
Star Strider
2021-11-17
编辑:Star Strider
2021-11-17
Yes.
A = randi(9,5,1)
B = randi(9,6,1)
Out = [A; B]
EDIT — See the documentation section on MATLAB Operators and Special Characters to understand how that works, and others of interest.
.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!