異なる要素数の配列の結合

조회 수: 14 (최근 30일)
Yu Matsumoto
Yu Matsumoto 2023년 7월 27일
댓글: Yu Matsumoto 2023년 7월 27일
a=[1 2]'、b=[1 2 4]'のような異なる要素数の配列を、垂直方向に結合する方法があればご教示ください。
異なる要素数の時系列データを垂直方向に結合したいイメージです。"union"関数だと重複要素が削除されるためNGでした。
例)
input : a=[1 2]'、b=[1 2 4]'
output: [1 2 1 2 4]'
  댓글 수: 1
Yu Matsumoto
Yu Matsumoto 2023년 7월 27일
すみません、ちょっと調べると自己解決しましたので取り下げさせていただきます。
a=[1 2]、b=[1 2 4]
c=[a,b]
または
c=cat(2,a,b)

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!