combining 5 rows into one matrix
조회 수: 5 (최근 30일)
이전 댓글 표시
How do I combine 5 different (1x10) vectors into a single matrix of dimension 5x10
댓글 수: 0
답변 (2개)
Cris LaPierre
2020년 12월 6일
mat1=1:10;
mat2=11:20;
mat3=21:30;
mat4=31:40;
mat5=41:50;
% Combine using square brackets and transpose to make 5x10
newMat = [mat1; mat2; mat3; mat4; mat5]'
VBBV
2022년 7월 20일
mat1=1:10;
mat2=11:20;
mat3=21:30;
mat4=31:40;
mat5=41:50;
% transpose is not required to make 5x10
newMat = [mat1; mat2; mat3; mat4; mat5]
transpose is not necessary
댓글 수: 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!