Concatenate structure with subfields
4 views (last 30 days)
I have a 1x1 structure which has 1x3 fields which further has 1x5 runs. Each run has different double data(same no. of columns, different no. rows). I want to concatenate it like run 1 its data 203x7 double, run 2 its data 216x7 double and so on. Also assign Column names to each 7 columns. How to do that within a loop?
John Chilleri on 22 Feb 2017
Hopefully I understand your question properly.
You can concatenate them with:
data = [datarun1; datarun2; ...; datarun5];
Furthermore, the easiest way to have column names is to have a separate variable (1x7) containing the names, unless you want to look into cells, in which you can have column names at the top before the data. There might exist a better way for column names, but these are some simple approaches.
Hope this helps!