Error Concatenating multiple tables

1 visualizzazione (ultimi 30 giorni)
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 :)

Risposta accettata

Jakeb Chouinard
Jakeb Chouinard il 3 Ago 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 Commenti
Nina Perf
Nina Perf il 3 Ago 2021
Thank you I solved it :)
Jakeb Chouinard
Jakeb Chouinard il 3 Ago 2021
Nice job! Cheers, Jakeb

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Cell Arrays in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by