image thumbnail


version 1.0.0 (2.66 KB) by Dana Swarbrick
Provides an estimate of a participant's entrainment to a musical beat.


Updated 30 Jan 2019

View License

Head movements were recorded during two concerts. To examine whether participants were synchronizing their head movements to the beat of the music, the period of their motion was compared to the tempo of the song. The function returns a value named degree of entrainment which is the number of time windows in which the participant is entraining to the music divided by the total number of time windows in the song.

This function can examine whether other periodic motion is synchronized or entrained to other musical or rhythmic stimuli.

Cite As

Dana Swarbrick (2022). mcentrainment (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018b
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!