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

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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Logical finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!