Concatenating variables within a table

2 vues (au cours des 30 derniers jours)
Felipe Salinas Martinez
Felipe Salinas Martinez le 12 Mai 2021
Hello everyone,
I have this table that I created that has the same characteristics as other variables I need to work with. The fact is that I have used the rows2vars command to rearrange the values and now I want to concatenate everything into one column, but I can't. I'm able to do it on individual variables with the reshape function but I haven't figure a way to do it in a table.
I need to combine all the columns into one to obtain the "long format" of repeated measures longitudinal data set to run statistical analysis. And as I'm working with several variables I would like to make it easier for myself for rearranging all of them into "long format"
hope someone can help me sort the issue
P.S. I'm attaching the mat file with the table that I need to combine.

Réponse acceptée

David Fletcher
David Fletcher le 12 Mai 2021
Not sure if this is what you want, but stack will pack the table
packedTable=stack(T1,1:114)
You'll end up with two columns: the first column is the column in the original table the data in the second column came from
  1 commentaire
Felipe Salinas Martinez
Felipe Salinas Martinez le 12 Mai 2021
Thanks, it helped a lot to get what I needed.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by