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?

 채택된 답변

Star Strider
Star Strider 2021년 11월 17일
편집: Star Strider 2021년 11월 17일
Yes.
A = randi(9,5,1)
A = 5×1
4 6 7 9 1
B = randi(9,6,1)
B = 6×1
2 4 8 3 3 1
Out = [A; B]
Out = 11×1
4 6 7 9 1 2 4 8 3 3
EDIT — See the documentation section on MATLAB Operators and Special Characters to understand how that works, and others of interest.
.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

릴리스

R2021a

태그

질문:

2021년 11월 17일

편집:

2021년 11월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by