필터 지우기
필터 지우기

Error Concatenating multiple tables

조회 수: 2 (최근 30일)
Nina Perf
Nina Perf 2021년 8월 3일
댓글: Jakeb Chouinard 2021년 8월 3일
I need to concatenate multiple tables vertically. All tables have the same Variable Names in the columns and they have the same number of columns.
Respectively:
S1 -> 93x27 table
T1 ->126x27 table
S2 ->192x27 table
T2 ->252x27 table
I am using this approach:
Complete_Data = [S1; T1; S2; T2]
I get this error:
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Can you please help?
Thank you in advance :)

채택된 답변

Jakeb Chouinard
Jakeb Chouinard 2021년 8월 3일
Since I can't see what exactly is within these tables, I'll take a shot in the dark:
This could be due to the data-types within the tables. If you're trying to vertically concatenate character array table entries, for instance, if the two tables do not have the same length for these arrays, it would have the same effect as attempting the below:
['abc';'de']
If their concatenation is necessary, it may be necessary to convert these char arrays to strings or cells of char arrays. For some information regarding this, I'll direct you here.
If this is not the case, could you please supply us with more information regarding what is in the tables? E.g. run the below:
whos
or
summary(table)
  댓글 수: 4
Nina Perf
Nina Perf 2021년 8월 3일
Thank you I solved it :)
Jakeb Chouinard
Jakeb Chouinard 2021년 8월 3일
Nice job! Cheers, Jakeb

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by