I have a multidimensional matrix 19 x 64 x 5 x 21 which corresponds to 19 participants x 64 channels x 5 timepoints x 21 data values.
I want to collapse the last two dimensions of the matrix so that I end up with the mean of the (5 x 21) data values, per participant, per channel (i.e. a 19 x 64 (x1) matrix)
I've tried using mean, tried using reshape etc but I am really struggling with the scale of the data and picturing how the the four dimensions fit together. As such I can't confidently manipulate the data across the four dimensions so any guidance would be appreciated.
Best Answer