Course exercises

Exercises for course: Imaging in neuroscience: With a focus on MEG and EEG methods

Follow the links to get to the tutorial scripts. Run the code in the tutorials in MATLAB. Copy/paste, or write the code into a new script in MATLAB and run from there.

Questions in the tutorial files must be answered in a separate text document and submitted for approval by the end of the day. Include figures from the exercises as needed.

For the tutorials Wednesday and Thursday, we will use the toolbox FieldTrip for MATLAB. You can download FieldTrip from their website or from Github. The FieldTrip toolbox is updated daily, and changes to FieldTrip functions might occur over time. The tutorial material was tested with the version made 2018-01-29. If you experience problems with the tutorial material, we recommend using this version. You can download it here:

Data for the Wednesday and Thursday exercises can be downloaded here: <Download link> (Warning: There is an error in the datafile, we will fix this soon). The full data set is about 9 GB so it will take some time to download. You should have downloaded the data and FieldTrip before Wednesday morning.

Finally, for Friday’s lecture, we ask you to download and install additional software, the Cosmomvpa toolbox ( You have time to sort this out during the week, but please make sure it is in place before Friday.

Don’t hesitate to let us know if there are problems.


Processing MEG/EEG data, analysis of evoked responses, and source reconstruction using single dipoles and Minimum-Norm Estimates.

Preprocess M/EEG data and evoked analysis

Preparing MRI for source analysis

Dipole fit

Minimum-Norm Estimates


Frequency analysis, time-frequency analysis and source reconstruction with beamformer.

Frequency analysis



Multivariate analysis and machine learning on MEG and EEG data.

Please follow the link below and download the data so you have it available on your laptop by Friday morning: