Customizing common M/EEG plots part 1: the event-related potential/field (ERP/F)

I recently (well, 25 June 2018) taught a data visualization workshop as part of the Language in Interaction consortium at the Donders Institute in Nijmegen. As part of my workshop, I thought I'd go over some fairly simple ways in which people could customize (or dare I say: improve?) some commonly used plots when analyzing MEG or EEG data. Since it would be a waste to have all that preparation for the workshop go to waste on just the small audience that was there that day, I'll post my code with some explanations here on my blog as well. Today: how to better visualize plots like the event-related potential or field. Or, more generally: how to visualize 1D data over time.

Continue reading "Customizing common M/EEG plots part 1: the event-related potential/field (ERP/F)"

Concatenate subfields from Matlab structure into one data array

Don't you just hate when you have an [cci]MxN[/cci] struct array in Matlab, where each element contains some [cci]PxK[/cci] data field, and you just really want to have all that data in a single [cci]PxKxMxN[/cci] array? OK, maybe this doesn't happen to you very frequently, but it has happened to me. In fact, it has happened so often that I decided to write a (very simple) general solution to this problem.

Continue reading "Concatenate subfields from Matlab structure into one data array"