I was looking for some Matlab code for computing phase-locking histograms from LFPs and I stumbled upon these lecture notes for a psychology class at University of Arizona by John J.B. Allen. The Advanced Signal Processing class covers different approaches for computing inter-trial and inter-electrode phase locking. There’s some lecture slides, matlab code, and even a video podcast of the lecture.