I think the question is right in the DSP section, it's however rather specific. As far as I found by a few clicks, method of phase locking value is well explained in literature, there are also MATLAB program examples.
Regarding your question, I think that "calculate the phase locking value across trials of two matrics of EEG data" is not the usual and I presume no useful way to apply the method. The actual phase observed in each trial is arbitrary, PLV describes phase coincidence of channels, the coincidence pattern is characteristic but not the instantaneous phase. Respectively PLV is not calculated across trials, instead PLV patterns of multiple trials can be compared.