I have a structure that has 10 fields. I want to take the fields and put them into a single matrix. So, I have struct:
Struct =
struct with fields:
Trt_1: {8×2×2 cell}
Trt_2: {16×2×2 cell}
Trt_3: {10×2×2 cell}
Trt_4: {12×2×2 cell}
Trt_5: ''
Trt_6: ''
Trt_7: ''
Trt_8: ''
Trt_9: ''
Trt_10: ''
I want to take Trt_1, Trt_2, Trt_3, Trt_4 out of the structure and concatenate them into a single matrix that would have a row count of 46 (8+16+10+12=46) and the dimension 46x2x2
Thank you everyone - wrote a crazy code that looped over a bunch of if statements to extract the data but it's too complicated and doesn't work under certain conditions. Quick note, this is a script I'm using to analyze different data sets with different numbers of treatments. I'd like a code that can handle processing a data set of Trt_1, Trt_2, Trt_5 with no Trt_3 and no Trt_4, and also handle a different amount of treatments and rows of data. So, nothing hard coded.