P300 ERP Preprocessing GUI

Version 1.3 (167 MB) by Howe Zhu
This is a GUI that allows you to play around with the different EEG preprocessing methods and see how it effects the ERP.
Updated 22 Jun 2022

View License

This app is primarily an educational tool for getting into Electroencephalography (EEG) Event-Related Potential (ERP) analysis. This GUI allows you to play around with the different EEG preprocessing methods and understand how each step can affect the ERP waveform. The app will allow you to load up to two ".set" EEG datasets (refer to EEGLab toolbox) and perform preprocessing and fundamental ERP analysis comparing datasets.
To install please unpack the zip file and install "P300 ERP Preprocessing GUI.mlappinstall". Data folder contains sample data for this app.
This app requires: Statistics and Machine Learning Toolbox
Load Data 1/2: File explorer pop-up for selecting a file you want to load (can analyse up to two datasets simultaneously).
Clear Datasets: Unloads current datasets.
Preprocessing steps: Each step will have an "Order" drop down. This menu refers to the order of operations for each preprocessing step (1->2->3->4). I would recommend following the default order. This functionality exists to demonstrate the effect of using a different (potentially incorrect) order of preprocessing steps.
P-Value: This value is calculated through a simple P300 peak amplitude detection function that detects local maxima around the 250-500ms range [1]. The P-Value is calculated through a One-Way Anova (anova1) test.
Y Upper/Lower lim: This will adjust the y-axis of the plot.
Dataset format: This app will only work with .set format files with EEG data. When comparing two datasets, please ensure both files use the same event labels.
Sample Dataset: I've attached a sample dataset for testing. It involves a simple Blue(non-target) and Green (target) circle Oddball scenario (800ms on and 400ms off). Dataset1 was recorded on a monitor, while Data2 was recorded on a Virtual Reality headset (HTC Vive Pro). There should be around 50 trials per dataset.
Other info
Will be used in the "UTS Tech Festival: How to Bridge the gap between Neuroscience & Computational Intelligence for BCI with Google TensorFlow?" workshop at the University of Technology on the 22/06/2022.
-Will attach the slide once the workshop has been completed.
This app uses the EEGLab toolbox by Delorme A & Makeig S (2004) EEGLAB: an open-source toolbox for analysis of single-trial EEG dynamics, Journal of Neuroscience Methods 134:9-21. PDF.
I would highly recommend trying the EEGLab lab tutorial before using this tool: https://eeglab.org/tutorials/
By Dr Howe Zhu
Feel free to reach out to me with any related questions at
[1] Polich, J. (2007). "Updating P300: An integrative theory of P3a and P3b". Clinical Neurophysiology. 118 (10): 2128–2148. doi:10.1016/j.clinph.2007.04.019. PMC 2715154. PMID 17573239.

Cite As

Howe Zhu (2024). P300 ERP Preprocessing GUI (https://www.mathworks.com/matlabcentral/fileexchange/113645-p300-erp-preprocessing-gui), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Update description


Updated Referencing options


Edited text.
Include sample data.