How to construct a vector cell array from two cells with different dimensions

Hi all,
I have cells called "Station_ID_1" and "Station_ID_2"."Station_ID_1" is a 1*2 cell (each cell is 1000*1 cell) and "Station_ID_2" is a 547*1. How can I have 2547*1 cell? (Both cells have been attached here)

 採用された回答

DGM
DGM 2022 年 12 月 30 日
Perhaps something like this?
allstationID = [vertcat(Station_ID_1{:}); Station_ID_2]

3 件のコメント

Behrooz Daneshian
Behrooz Daneshian 2022 年 12 月 30 日
Thank you very much.
Simpler:
allstationID = vertcat(Station_ID_1{:},Station_ID_2)
DGM
DGM 2022 年 12 月 31 日
Good gravy that's a forehead slapping moment.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2022 年 12 月 30 日

コメント済み:

DGM
2022 年 12 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by