A MATLAB-based graphical user interface (GUI) for extracting, organizing, and processing multimodal experimental data from .xdf files across multiple subjects, activities, and experimental conditions.
This tool was developed to support large-scale human performance and sensorimotor experiments involving synchronized physiological, biomechanical, and behavioral data streams.
Jeevan Jayasuriya
NeuroErgonomics Lab
University of Wisconsin–Madison
This repository provides a unified MATLAB UI for:
- Selecting subject ranges (e.g., S1–S10)
- Selecting experimental activities (single activity or all activities)
- Selecting data streams (e.g., fNIRS, EMG, Force Plate, Eye Tracking, Xsens kinematics)
- Extracting synchronized time series and time stamps from
.xdffiles - Automatically routing extracted data to dedicated processing functions
The UI is designed to minimize manual file handling and enforce consistent data organization across large experimental datasets.
- Interactive MATLAB UI built with
uifigure - Batch extraction across:
- Multiple subjects
- Multiple activities
- Pre/Post sessions
- Stimulated / Non-stimulated trials
- Modular processing architecture
- Supports multimodal data streams commonly used in neuroergonomics research
- Easily extendable to new streams or processing functions
-
Main_UI_V1.m
Main UI entry point (Data_extraction_functions_v12) and data extraction logic. -
load_xdf.m
XDF file loader used throughout the pipeline.
processfNIRS_V1.mprocessHomer3_V1.mprocessEMG_V1.mprocessHeartRate_V1.mprocessForcePlate_V1.mprocessEyeTracking_V1.mprocessLinearSegmentKinematics_V1.mprocessAngularKinematics1_V1.mprocessCenterOfMass1_V1.mprocessEulerDatagram1_V1.mprocessTimeFrames_V1.mprocessVideoFrames_V1.mprocessQuaternion.m
Extract_ECG_from_XDFandActiheart.mCombineMATFiles.m
- Brain data: fNIRS, Homer3
- Muscle & physiology: EMG, Heart Rate (including HRV metrics)
- Biomechanics: Force Plate, Center of Mass
- Motion capture (Xsens): Linear and Angular kinematics, Euler angles, Quaternions
- Perceptual & auxiliary: Eye Tracking, Video frames, Timestamp streams
Channel and segment options are dynamically updated in the UI based on the selected data type.
- Clone or download the repository
- Add the repository to your MATLAB path:
addpath(genpath(pwd)) - Launch the UI:
Main_UI_V1 - Use the UI to select subjects, activities, and data types, then click Extract Data.
Depending on the selected data type, processing functions may export processed data to MATLAB variables, save analysis-ready files, or generate plots. Output behavior is defined within each process*.m file.
To add a new data stream:
- Add the stream name to the UI dropdown
- Define channel/segment options
- Implement a new
processYourStream_V1.m - Register it in the
switch dataTypeblock
- File paths and storage locations are intentionally not hard-coded
- Users are expected to configure their own data directories externally
- Experimental data are not included in this repository
This project is licensed under the MIT License. See the LICENSE file for details.
Developed as part of ongoing research at the NeuroErgonomics Lab, University of Wisconsin–Madison.