Hi, I have created a structure that splits my data with regards to specific loads. I was able to combine the repeats so all my data is in one structure.
I now want to calc averages so i can plot the data.
I have used
CoF1= [data_all{1, 2}(:, 5), data_all{1, 4}(:, 5), data_all{1, 6}(:, 5)]; %to have data together
CoF_av1 = mean(CoF1')'; %to get data across the rows
CoF_avall1 = mean(CoF1,'all'); %to get one average value fro all data
However as you can see the data splits up 10 times for this set and I would like to to create a for loop that will do it easier for me.
Therefore, my question is how would I create a loop to just average the 3 sets of data for me from within a structure.
So from the image I want to find out the average for each colum across each embedded structure-2, 4 and 6 column from 'data_all'.
Such that I am left with one data file that is the average of these 3, where each colum is a result of the average of my repeats. and then have an additional row that averages the column.
Best Answer