Filter löschen
Filter löschen

Error Concatenating multiple tables

2 Ansichten (letzte 30 Tage)
Nina Perf
Nina Perf am 3 Aug. 2021
Kommentiert: Jakeb Chouinard am 3 Aug. 2021
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 :)

Akzeptierte Antwort

Jakeb Chouinard
Jakeb Chouinard am 3 Aug. 2021
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 Kommentare
Nina Perf
Nina Perf am 3 Aug. 2021
Thank you I solved it :)
Jakeb Chouinard
Jakeb Chouinard am 3 Aug. 2021
Nice job! Cheers, Jakeb

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Cell Arrays finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by