1

I have a 3d matrix of EEG data containing (time x electrode x trial). I would like to collapse the data across trials to obtain average trial values for each electrode and time point.

Can someone please walk be through how to do this in MATLAB?

SaraA
  • 33
  • 6

1 Answers1

3

mean will do it.

meanData = mean(data, 3)

In general, the MATLAB documentation is quite good. Googling what you want done and adding "MATLAB" to your query will produce pretty good results. If you know what function you are looking for, you can type help <function name> in your MATLAB interpreter and it will show you the docs.

Luis Mendo
  • 110,752
  • 13
  • 76
  • 147
Matt
  • 4,029
  • 3
  • 20
  • 37