You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: PhaseLagIndex_surrogate.m
    path of file: ./repos/EEGapp/EEGapp/custom_stuff
    
    the code of the file until where you have to start completion: function surro_PLI=PhaseLagIndex_surrogate(X)
% Given a multivariate data, returns phase lag index matrix

    
function surro_PLI=PhaseLagIndex_surrogate(X)
% Given a multivariate data, returns phase lag index matrix
% Modified the mfile of 'phase synchronization'
ch=size(X,2); % column should be channel
%%%%%% Hilbert transform and computation of phases
% for i=1:ch
%     phi1(:,i)=angle(hilbert(X(:,i)));
% end