how to merge two vectors
조회 수: 1 (최근 30일)
이전 댓글 표시
A= [ 0.567 6.345 1.789 0.678 0.4678] B= [0 0 0 0 0 0 0 ]
result will be
C= [0.567 6.345 1.789 0.678 0.4678 0 0]
댓글 수: 0
채택된 답변
Mischa Kim
2014년 2월 14일
편집: Mischa Kim
2014년 2월 14일
How about:
C = B + [A zeros(1,length(B)-length(A))]
assuming that by merge you mean add-merge. If it's just about adjusting the size of the vector, then use
C = [A zeros(1,length(B)-length(A))]
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Standard File Formats에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!