필터 지우기
필터 지우기

How to append vectors end to end???

조회 수: 281 (최근 30일)
Ihtisham Khan
Ihtisham Khan 2018년 5월 3일
댓글: Ihtisham Khan 2018년 5월 3일
Hi, I have two vectors and wanted to join these vectors end to end. The output i wanted is,
[c]=
1 2 3 4 5 6 7 8 9 10 11 12 13 14
but when i run the code,
e.g.
[a] = [1 2 3 4 5 6 7] ;
[b] = [8 9 10 11 12 13 14];
[c] = [a ; b];
output::
[c] =
1 2 3 4 5 6 7
8 9 10 11 12 13 14
How would I do this? Thanks for your help.
  댓글 수: 3
Stephen23
Stephen23 2018년 5월 3일
Basic MATLAB concepts, such as how to create and concatenate arrays, are covered in the introductory tutorials (which are highly recommended for all beginners):
Ihtisham Khan
Ihtisham Khan 2018년 5월 3일
thanks Stephen Cobeldick and Dennis

댓글을 달려면 로그인하십시오.

채택된 답변

Ameer Hamza
Ameer Hamza 2018년 5월 3일
See cat().
out = cat(2, a, b);
cat gives you better flexibility over how to concatenate.

추가 답변 (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