I have 10 structures with 6 fields, each with 3D arrays. All of them have the same organization.
I want to do the average of the 10 structures, as a result I would have 1 mean structure with 6 fields, each with 3D arrays.
For example, I have:
Subject_1_RMSE_angle = struct with fields: narxwalk: [17×10×16 double] EMGwalk: [17×10×16 double] narxup: [17×10×16 double] EMGup: [17×10×16 double] narxdown: [17×10×16 double] EMGdown: [17×10×16 double] Subject_2_RMSE_angle = struct with fields: narxwalk: [17×10×16 double] EMGwalk: [17×10×16 double] narxup: [17×10×16 double] EMGup: [17×10×16 double] narxdown: [17×10×16 double] EMGdown: [17×10×16 double] Subject_3_RMSE_angle = struct with fields: narxwalk: [17×10×16 double] EMGwalk: [17×10×16 double] narxup: [17×10×16 double] EMGup: [17×10×16 double] narxdown: [17×10×16 double] EMGdown: [17×10×16 double]
then do the mean, and have a results as:
Subject_MEANs_RMSE_angle = struct with fields: narxwalk: [17×10×16 double] EMGwalk: [17×10×16 double] narxup: [17×10×16 double] EMGup: [17×10×16 double] narxdown: [17×10×16 double] EMGdown: [17×10×16 double]
Thank you.
Best Answer