I currently have the for loop below. where NoS is the number of subjects and NoJ is the number of jumps.
NoS = 6 NoJ = 4 bars = NaN(NoS*NoJ,1); errors = NaN(NoS*NoJ,1);
for i=1:NoS*NoJ clear ave stdev ave = mean(data((i*NoJ)-3:(i*NoJ),3)); stdev = std(data((i*NoJ)-3:(i*NoJ),3)); bars(i) = ave; errors(i) = stdev; end
At the moment this imports the means and standard deviations straight into the arrays bars and errors in one long column (a vector). I however want it so it will each subject data into a new row in the array. In this example that would mean the array would be a 6x4 as there are 6 subjects and 4 jump types for each subject. I need the first 4 values to go in spaces (1,1) (1,2) (1,3) and (1,4) and then for it to move down to the next row and import the next 4 values in the same fashion.
No products are associated with this question.