This repository contains MATLAB code for preprocessing and analyzing EEG and behavioral data from a study on cortical entrainment in children with Autism Spectrum Disorder (ASD) and typically developing (TD) peers. The codes were used for the study published in: "Not Just Noise: Impaired Oscillatory Entrainment Reflects Reduced Temporal Flexibility in Autism". doi: https://doi.org/10.1101/2025.07.02.662876
preprocessing/: Preprocessing script (Preprocess_EEG_All.m) for EEG data.analysis/: Scripts for ERP, frequency analysis, phase-behavior coupling, TRF models, and EEG-clinical correlations.params/: Parameter definition files for different components.triggers/: Trigger extraction scripts.layout/: EEG layout file (64_lay.mat).docs/: Original Readme and related documentation.
Preprocess_EEG_All.m— EEG preprocessing using FieldTrip.Run_Entrainment_Analyses.m— Calls functions for:- ERP analysis
- Time-frequency and phase-locking analyses
- Inactive mode
- Behavior–EEG phase coupling
- Temporal Response Function (TRF) modeling
- Correlation with clinical measures
- FieldTrip toolbox (required for all preprocessing analyses)