Skip to content

A matlab EEG toolbox to perform overlap correction and non-linear & linear regression.


Notifications You must be signed in to change notification settings


Repository files navigation


A toolbox for deconvolution of overlapping EEG signals and (non)-linear modeling

  • Linear deconvolution
  • Model specification using R-style formulas (EEG~1+face+age)
  • Programmed in a modular fashion
  • Spline regression
  • Regularization (using glmnet)
  • Temporal basis functions (Fourier & Splines)
  • Estimate temporal response functions (TRFs) for time-continuous predictors
  • Cross-validation

Getting help

📢 Try out our discussion forum - we often get questions via email, a more transparent and open way is to use the github discussions feature


git clone
git submodule update --init --recursive --remote



Simple example

Check out the toolbox tutorials for more information!

EEG = tutorial_simulate_data('2x2')
EEG = uf_designmat(EEG,'eventtypes',{'fixation'},'formula','y ~ 1+ cat(stimulusType)*cat(color)')
EEG = uf_timeexpandDesignmat(EEG,'timelimits',[-0.5 1])
EEG = uf_glmfit(EEG)
% (strictly speaking optional, but recommended)
ufresult = uf_condense(EEG)
ax = uf_plotParam(ufresult,'channel',1);


Please cite as:

Ehinger BV, Dimigen O: "Unfold: An integrated toolbox for overlap correction, non-linear modeling, and regression-based EEG analysis", peerJ 2019,

In addition, consider also citing the following reference, which illustrates the possibilites and options of unfold for a specific application example:

Dimigen O, Ehinger BV: "Regression-based analysis of combined EEG and eye-tracking data: Theory and applications. Journal of Vision, 21(1), 3-3",

Research notice

Please note that this repository is participating in a study into sustainability of open source projects. Data will be gathered about this repository for approximately the next 12 months, starting from June 2021.

Data collected will include number of contributors, number of PRs, time taken to close/merge these PRs, and issues closed.

For more information, please visit our informational page or download our participant information sheet.