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

조회 수: 4 (최근 30일)
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
Stephen23
Stephen23 2022년 12월 30일
Simpler:
allstationID = vertcat(Station_ID_1{:},Station_ID_2)
DGM
DGM 2022년 12월 31일
Good gravy that's a forehead slapping moment.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by